1328 if connected is None: |
1328 if connected is None: |
1329 links_connected = False |
1329 links_connected = False |
1330 continue |
1330 continue |
1331 |
1331 |
1332 points = link["points"] |
1332 points = link["points"] |
1333 end_connector = connected.GetConnector(wx.Point(points[-1][0], points[-1][1]), link["formalParameter"]) |
1333 end_connector = connected.GetConnector( |
|
1334 wx.Point(points[-1][0], points[-1][1]) |
|
1335 if len(points) > 0 else wx.Point(0, 0), |
|
1336 link["formalParameter"]) |
1334 if end_connector is not None: |
1337 if end_connector is not None: |
1335 wire = Wire(self) |
1338 if len(points) > 0: |
1336 wire.SetPoints(points) |
1339 wire = Wire(self) |
|
1340 wire.SetPoints(points) |
|
1341 else: |
|
1342 wire = Wire(self, |
|
1343 [wx.Point(*start_connector.GetPosition()), |
|
1344 start_connector.GetDirection()], |
|
1345 [wx.Point(*end_connector.GetPosition()), |
|
1346 end_connector.GetDirection()]) |
1337 start_connector.Connect((wire, 0), False) |
1347 start_connector.Connect((wire, 0), False) |
1338 end_connector.Connect((wire, -1), False) |
1348 end_connector.Connect((wire, -1), False) |
1339 wire.ConnectStartPoint(None, start_connector) |
1349 wire.ConnectStartPoint(None, start_connector) |
1340 wire.ConnectEndPoint(None, end_connector) |
1350 wire.ConnectEndPoint(None, end_connector) |
1341 connected.RefreshConnectors() |
1351 connected.RefreshConnectors() |