X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fconn-avoid-ref.cpp;h=a918f8745903f3dfeea95cb9fdc9593de80647f4;hb=8cd8b6ee0c2bd47add62310866479d49a2070057;hp=b2aa0ce6bc1e9877242de5f3697a7a90048c410f;hpb=2c3770a1372227f2ff4099878d28db8be0c1f1c2;p=inkscape.git diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index b2aa0ce6b..a918f8745 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -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();