src/toolsets/filetoolset.cpp

changeset 1186
eae8b3bce545
parent 1164
eabcd749759a
child 1192
317f4ce38f3f
equal deleted inserted replaced
1185:c2e0db52ea07 1186:eae8b3bce545
118 { 118 {
119 Model model {m_documents}; 119 Model model {m_documents};
120 m_documents->loadFileContents(&file, model, nullptr, nullptr); 120 m_documents->loadFileContents(&file, model, nullptr, nullptr);
121 121
122 currentDocument()->clearSelection(); 122 currentDocument()->clearSelection();
123 123 currentDocument()->merge(model, position, nullptr, [&](LDObject* object, int)
124 for (LDObject* object : model.objects())
125 { 124 {
126 currentDocument()->insertObject (position, object);
127 currentDocument()->addToSelection(object); 125 currentDocument()->addToSelection(object);
128 position++; 126 });
129 }
130
131 m_window->refresh(); 127 m_window->refresh();
132 m_window->scrollToSelection(); 128 m_window->scrollToSelection();
133 } 129 }
134 else 130 else
135 { 131 {

mercurial