1338 # Method called when a RightUp event have been generated |
1338 # Method called when a RightUp event have been generated |
1339 def OnRightUp(self, event, dc, scaling): |
1339 def OnRightUp(self, event, dc, scaling): |
1340 handle_type, handle = self.Handle |
1340 handle_type, handle = self.Handle |
1341 if handle_type == HANDLE_CONNECTOR and self.Dragging and self.oldPos: |
1341 if handle_type == HANDLE_CONNECTOR and self.Dragging and self.oldPos: |
1342 wires = handle.GetWires() |
1342 wires = handle.GetWires() |
1343 if len(wires) != 1: |
1343 if len(wires) == 1: |
1344 return |
1344 block = wires[0][0].GetOtherConnected(handle).GetParentBlock() |
1345 block = wires[0][0].GetOtherConnected(handle).GetParentBlock() |
1345 block.RefreshModel(False) |
1346 block.RefreshModel(False) |
1346 if not isinstance(block, SFC_Divergence): |
1347 if not isinstance(block, SFC_Divergence): |
1347 if handle in self.Inputs: |
1348 if handle in self.Inputs: |
1348 block.RefreshInputModel() |
1349 block.RefreshInputModel() |
1349 else: |
1350 else: |
1350 block.RefreshOutputModel() |
1351 block.RefreshOutputModel() |
|
1352 Graphic_Element.OnRightUp(self, event, dc, scaling) |
1351 Graphic_Element.OnRightUp(self, event, dc, scaling) |
1353 else: |
1352 else: |
1354 pos = GetScaledEventPosition(event, dc, scaling) |
1353 pos = GetScaledEventPosition(event, dc, scaling) |
1355 # Popup the menu with special items for a block and a connector if one is handled |
1354 # Popup the menu with special items for a block and a connector if one is handled |
1356 connector = self.TestConnector(pos, exclude=False) |
1355 connector = self.TestConnector(pos, exclude=False) |