gui_editactions.cpp

changeset 110
a62ab18d1b80
parent 109
f40b35142586
child 118
649110bb36a8
--- a/gui_editactions.cpp	Mon Apr 15 04:58:33 2013 +0300
+++ b/gui_editactions.cpp	Mon Apr 15 18:07:29 2013 +0300
@@ -79,11 +79,13 @@
 	vector<ulong> ulaIndices;
 	vector<LDObject*> paCopies;
 	
+	ulong idx = g_ForgeWindow->getInsertionPoint ();
+	
 	for (LDObject* obj : g_Clipboard) {
-		ulong idx = g_CurrentFile->addObject (obj->clone ());
-		
 		ulaIndices.push_back (idx);
 		paCopies.push_back (obj->clone ());
+		
+		g_CurrentFile->objects.insert (g_CurrentFile->objects.begin() + idx++, obj->clone ());
 	}
 	
 	History::addEntry (new AddHistory (ulaIndices, paCopies, AddHistory::Paste));

mercurial