33 #include "../GLRenderer.h" |
33 #include "../GLRenderer.h" |
34 #include "../Dialogs.h" |
34 #include "../Dialogs.h" |
35 #include "../Primitives.h" |
35 #include "../Primitives.h" |
36 #include "../Widgets.h" |
36 #include "../Widgets.h" |
37 #include "../Colors.h" |
37 #include "../Colors.h" |
|
38 #include "../GLCompiler.h" |
38 #include "ui_newpart.h" |
39 #include "ui_newpart.h" |
39 |
40 |
40 extern_cfg (Bool, gl_wireframe); |
41 extern_cfg (Bool, gl_wireframe); |
41 extern_cfg (Bool, gl_colorbfc); |
42 extern_cfg (Bool, gl_colorbfc); |
42 extern_cfg (String, ld_defaultname); |
43 extern_cfg (String, ld_defaultname); |
845 // Remove the selection now |
845 // Remove the selection now |
846 for (LDObject* obj : selection()) |
846 for (LDObject* obj : selection()) |
847 obj->destroy(); |
847 obj->destroy(); |
848 |
848 |
849 // Compile all objects in the new subfile |
849 // Compile all objects in the new subfile |
850 for (LDObject* obj : doc->objects()) |
850 R()->compiler()->compileDocument (doc); |
851 R()->compileObject (obj); |
|
852 |
|
853 g_loadedFiles << doc; |
851 g_loadedFiles << doc; |
854 |
852 |
855 // Add a reference to the new subfile to where the selection was |
853 // Add a reference to the new subfile to where the selection was |
856 LDSubfile* ref = new LDSubfile(); |
854 LDSubfile* ref = new LDSubfile(); |
857 ref->setColor (maincolor); |
855 ref->setColor (maincolor); |