| 554 // main document. |
554 // main document. |
| 555 for (LDObject* object : selectedObjects().toList()) |
555 for (LDObject* object : selectedObjects().toList()) |
| 556 currentDocument()->remove(object); |
556 currentDocument()->remove(object); |
| 557 |
557 |
| 558 // Add a reference to the new subfile to where the selection was |
558 // Add a reference to the new subfile to where the selection was |
| 559 currentDocument()->emplaceAt<LDSubfileReference>(referencePosition, subfile, Matrix::identity, Vertex {0, 0, 0}); |
559 currentDocument()->emplaceAt<LDSubfileReference>(referencePosition, subfile->name(), Matrix::identity, Vertex {0, 0, 0}); |
| 560 |
560 |
| 561 // Refresh stuff |
561 // Refresh stuff |
| 562 m_window->updateDocumentList(); |
562 m_window->updateDocumentList(); |
| 563 m_window->doFullRefresh(); |
563 m_window->doFullRefresh(); |
| 564 } |
564 } |