Code

Lookup object from repr instead of id to fix redo of undo of guide creation :-)
authorjohanengelen <johanengelen@users.sourceforge.net>
Wed, 5 Dec 2007 00:00:07 +0000 (00:00 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Wed, 5 Dec 2007 00:00:07 +0000 (00:00 +0000)
src/sp-namedview.cpp

index a26d1ce0e0fbb47e912f51ed87fc51c1576b9a32..a9c6bbfd6d449b905a4ccc7caab97c86b90dae56 100644 (file)
@@ -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;