--- a/src/gui_editactions.cpp Sun Jul 07 17:45:48 2013 +0300 +++ b/src/gui_editactions.cpp Sun Jul 07 23:17:17 2013 +0300 @@ -127,13 +127,16 @@ // Merge in the inlined objects for (LDObject* inlineobj : objs) { - // This object is now inlined so it has no parent anymore. - inlineobj->setParent (null); - g_curfile->insertObj (idx++, inlineobj); + str line = inlineobj->raw(); + delete inlineobj; + + LDObject* newobj = parseLine( line ); + g_curfile->insertObj( idx++, newobj ); + g_win->sel() << newobj; } // Delete the subfile now as it's been inlined. - g_curfile->forgetObject (obj); + g_curfile->forgetObject( obj ); delete obj; }