src/gui_editactions.cc

changeset 560
39085791128f
parent 557
04e140bdeb0b
child 570
e29a2ab838df
--- a/src/gui_editactions.cc	Wed Dec 18 17:03:35 2013 +0200
+++ b/src/gui_editactions.cc	Wed Dec 18 17:44:31 2013 +0200
@@ -132,8 +132,7 @@
 		// Merge in the inlined objects
 		for (LDObject * inlineobj : objs)
 		{	str line = inlineobj->raw();
-			delete inlineobj;
-
+			inlineobj->deleteSelf();
 			LDObject* newobj = parseLine (line);
 			getCurrentDocument()->insertObj (idx++, newobj);
 			newobj->select();
@@ -141,8 +140,7 @@
 		}
 
 		// Delete the subfile now as it's been inlined.
-		getCurrentDocument()->forgetObject (obj);
-		delete obj;
+		obj->deleteSelf();
 	}
 
 	g_win->refresh();
@@ -183,7 +181,7 @@
 			g_win->R()->compileObject (t);
 
 		// Delete this quad now, it has been split.
-		delete obj;
+		obj->deleteSelf();
 
 		num++;
 	}

mercurial