src/toolsets/filetoolset.cpp

changeset 1073
a0a0d581309b
parent 1072
9ce9496427f2
child 1079
67c6e5d32e68
--- a/src/toolsets/filetoolset.cpp	Sat Jan 28 17:47:06 2017 +0200
+++ b/src/toolsets/filetoolset.cpp	Sun Jan 29 15:05:14 2017 +0200
@@ -118,14 +118,15 @@
 		if (file.open(QIODevice::ReadOnly))
 		{
 			// TODO: shouldn't need to go to the document manager to parse a file
-			LDObjectList objects = m_documents->loadFileContents(&file, nullptr, nullptr);
+			Model model;
+			m_documents->loadFileContents(&file, model, nullptr, nullptr);
 
 			currentDocument()->clearSelection();
 
-			for (LDObject* object : objects)
+			for (LDObject* object : model.objects())
 			{
 				currentDocument()->insertObject (position, object);
-				object->select();
+				currentDocument()->addToSelection(object);
 				m_window->renderer()->compileObject (object);
 				position++;
 			}

mercurial