gui.cpp

changeset 94
a9e67f6e610e
parent 92
586d294ca83f
child 96
2f175b3d8211
--- a/gui.cpp	Wed Apr 10 13:24:35 2013 +0300
+++ b/gui.cpp	Wed Apr 10 14:10:58 2013 +0300
@@ -298,11 +298,16 @@
 // =============================================================================
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 // =============================================================================
-void ForgeWindow::deleteSelection () {
+void ForgeWindow::deleteSelection (vector<ulong>* ulapIndices, std::vector<LDObject*>* papObjects) {
 	vector<LDObject*> objs = getSelectedObjects ();
 	
 	// Delete the objects that were being selected
 	for (LDObject* obj : objs) {
+		if (papObjects && ulapIndices) {
+			papObjects->push_back (obj->clone ());
+			ulapIndices->push_back (obj->getIndex (g_CurrentFile));
+		}
+		
 		g_CurrentFile->forgetObject (obj);
 		delete obj;
 	}

mercurial