Fixed bug when removing coil in LD viewer, wires wasn't deleted.
authorLaurent Bessard
Thu, 10 Oct 2013 17:10:01 +0200
changeset 1356 2d4cc768a1bc
parent 1355 9183fb765f16
child 1357 b8d577c7eb4b
Fixed bug when removing coil in LD viewer, wires wasn't deleted.
graphics/LD_Objects.py
--- a/graphics/LD_Objects.py	Thu Oct 10 17:04:23 2013 +0200
+++ b/graphics/LD_Objects.py	Thu Oct 10 17:10:01 2013 +0200
@@ -774,8 +774,8 @@
     
     # Unconnect input and output
     def Clean(self):
-        self.Input.UnConnect()
-        self.Output.UnConnect()
+        self.Input.UnConnect(delete = self.Parent.GetDrawingMode() == FREEDRAWING_MODE)
+        self.Output.UnConnect(delete = self.Parent.GetDrawingMode() == FREEDRAWING_MODE)
                 
     # Refresh the size of text for name
     def RefreshNameSize(self):