From e292128111ad080dada2c194a143c9309e41bd5c Mon Sep 17 00:00:00 2001 From: johanengelen Date: Wed, 5 Dec 2007 00:00:07 +0000 Subject: [PATCH] Lookup object from repr instead of id to fix redo of undo of guide creation :-) --- src/sp-namedview.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index a26d1ce0e..a9c6bbfd6 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -510,11 +510,10 @@ static void sp_namedview_child_added(SPObject *object, Inkscape::XML::Node *chil (* ((SPObjectClass *) (parent_class))->child_added)(object, child, ref); } - const gchar *id = child->attribute("id"); if (!strcmp(child->name(), "inkscape:grid")) { sp_namedview_add_grid(nv, child, NULL); - } else if (id) { - SPObject *no = object->document->getObjectById(id); + } else { + SPObject *no = object->document->getObjectByRepr(child); if ( !SP_IS_OBJECT(no) ) return; -- 2.30.2