Modifications on divergence not buffered fixed
authorlbessard
Fri, 13 Mar 2009 16:27:26 +0100
changeset 320 16c37059f63f
parent 319 efe0671df286
child 321 5b37e16f7b2a
Modifications on divergence not buffered fixed
graphics/SFC_Objects.py
--- a/graphics/SFC_Objects.py	Fri Mar 13 16:26:19 2009 +0100
+++ b/graphics/SFC_Objects.py	Fri Mar 13 16:27:26 2009 +0100
@@ -1340,15 +1340,14 @@
         handle_type, handle = self.Handle
         if handle_type == HANDLE_CONNECTOR and self.Dragging and self.oldPos:
             wires = handle.GetWires()
-            if len(wires) != 1:
-                return
-            block = wires[0][0].GetOtherConnected(handle).GetParentBlock()
-            block.RefreshModel(False)
-            if not isinstance(block, SFC_Divergence):
-                if handle in self.Inputs:
-                    block.RefreshInputModel()
-                else:
-                    block.RefreshOutputModel()
+            if len(wires) == 1:
+                block = wires[0][0].GetOtherConnected(handle).GetParentBlock()
+                block.RefreshModel(False)
+                if not isinstance(block, SFC_Divergence):
+                    if handle in self.Inputs:
+                        block.RefreshInputModel()
+                    else:
+                        block.RefreshOutputModel()
             Graphic_Element.OnRightUp(self, event, dc, scaling)
         else:
             pos = GetScaledEventPosition(event, dc, scaling)