src/actions/MainActions.cc

changeset 697
2766f7b037ad
parent 644
93dcd1a0e4bd
--- a/src/actions/MainActions.cc	Mon Mar 10 01:16:00 2014 +0200
+++ b/src/actions/MainActions.cc	Mon Mar 10 13:26:02 2014 +0200
@@ -35,6 +35,7 @@
 #include "../Primitives.h"
 #include "../Widgets.h"
 #include "../Colors.h"
+#include "../GLCompiler.h"
 #include "ui_newpart.h"
 
 extern_cfg (Bool,		gl_wireframe);
@@ -471,7 +472,6 @@
 
 		getCurrentDocument()->insertObj (idx, obj);
 		obj->select();
-		R()->compileObject (obj);
 		idx++;
 	}
 
@@ -847,9 +847,7 @@
 			obj->destroy();
 
 		// Compile all objects in the new subfile
-		for (LDObject* obj : doc->objects())
-			R()->compileObject (obj);
-
+		R()->compiler()->compileDocument (doc);
 		g_loadedFiles << doc;
 
 		// Add a reference to the new subfile to where the selection was
@@ -870,4 +868,4 @@
 		// Failed to save.
 		delete doc;
 	}
-}
\ No newline at end of file
+}

mercurial