Code

Fix self-snapping when dragging the transformation center of a selection containing...
[inkscape.git] / src / conn-avoid-ref.cpp
index b2aa0ce6bc1e9877242de5f3697a7a90048c410f..a918f8745903f3dfeea95cb9fdc9593de80647f4 100644 (file)
@@ -63,8 +63,8 @@ SPAvoidRef::~SPAvoidRef()
     const bool routerInstanceExists = (item->document->router != NULL);
 
     if (shapeRef && routerInstanceExists) {
-        Router *router = shapeRef->router();
-        router->removeShape(shapeRef);
+        // Deleting the shapeRef will remove it completely from 
+        // an existing Router instance.
         delete shapeRef;
     }
     shapeRef = NULL;
@@ -329,7 +329,8 @@ void SPAvoidRef::handleSettingChange(void)
     {
         g_assert(shapeRef);
 
-        router->removeShape(shapeRef);
+        // Deleting the shapeRef will remove it completely from 
+        // an existing Router instance.
         delete shapeRef;
         shapeRef = NULL;
     }
@@ -341,7 +342,7 @@ GSList *SPAvoidRef::getAttachedShapes(const unsigned int type)
     GSList *list = NULL;
 
     Avoid::IntList shapes;
-    GQuark shapeId = g_quark_from_string(item->id);
+    GQuark shapeId = g_quark_from_string(item->getId());
     item->document->router->attachedShapes(shapes, shapeId, type);
 
     Avoid::IntList::iterator finish = shapes.end();
@@ -365,7 +366,7 @@ GSList *SPAvoidRef::getAttachedConnectors(const unsigned int type)
     GSList *list = NULL;
 
     Avoid::IntList conns;
-    GQuark shapeId = g_quark_from_string(item->id);
+    GQuark shapeId = g_quark_from_string(item->getId());
     item->document->router->attachedConns(conns, shapeId, type);
 
     Avoid::IntList::iterator finish = conns.end();