Code

rearrange effect submenus, rename some effects, fix capitalization
[inkscape.git] / src / sp-conn-end-pair.cpp
index ff1005a1636e474c130a08289008ef803c731cb0..bb5d89107f521b617b9f4034e093b450a2dede71 100644 (file)
@@ -211,9 +211,30 @@ SPConnEndPair::update(void)
             _connRef->lateSetup(src, dst);
             _connRef->setCallback(&emitPathInvalidationNotification, _path);
         }
+        // Store the ID of the objects attached to the connector.
+        storeIds();
     }
 }
-    
+
+
+void SPConnEndPair::storeIds(void)
+{
+    if (_connEnd[0]->href) {
+        GQuark itemId = g_quark_from_string(_connEnd[0]->href);
+        _connRef->setEndPointId(Avoid::VertID::src, itemId);
+    }
+    else {
+        _connRef->setEndPointId(Avoid::VertID::src, 0);
+    }
+    if (_connEnd[1]->href) {
+        GQuark itemId = g_quark_from_string(_connEnd[1]->href);
+        _connRef->setEndPointId(Avoid::VertID::tar, itemId);
+    }
+    else {
+        _connRef->setEndPointId(Avoid::VertID::tar, 0);
+    }
+}
+
 
 bool
 SPConnEndPair::isAutoRoutingConn(void)