graphics/GraphicCommons.py
changeset 60 ef940f442b8d
parent 58 39cd981ff242
child 64 dd6f693e46a1
--- a/graphics/GraphicCommons.py	Thu Aug 02 17:54:42 2007 +0200
+++ b/graphics/GraphicCommons.py	Fri Aug 03 18:00:24 2007 +0200
@@ -1442,10 +1442,11 @@
     
     # Unconnects wire start point
     def UnConnectStartPoint(self, delete = False):
-        self.StartConnected.UnConnect(self, False)
         if delete:
+            self.StartConnected = None
             self.Delete()
-        else:
+        elif self.StartConnected:
+            self.StartConnected.UnConnect(self, unconnect = False)
             self.StartConnected = None
     
     # Moves the wire end point and update the wire points
@@ -1474,10 +1475,11 @@
     
     # Unconnects wire end point
     def UnConnectEndPoint(self, delete = False):
-        self.EndConnected.UnConnect(self, False)
         if delete:
+            self.EndConnected = None
             self.Delete()
-        else:
+        elif self.EndConnected:
+            self.EndConnected.UnConnect(self, unconnect = False)
             self.EndConnected = None
     
     # Moves the wire segment given by its index