2421 values["extension"], values["inputs"], |
2421 values["extension"], values["inputs"], |
2422 executionControl = values["executionControl"], |
2422 executionControl = values["executionControl"], |
2423 executionOrder = values["executionOrder"]) |
2423 executionOrder = values["executionOrder"]) |
2424 self.Controler.AddEditedElementBlock(self.TagName, id, values["type"], values.get("name", None)) |
2424 self.Controler.AddEditedElementBlock(self.TagName, id, values["type"], values.get("name", None)) |
2425 connector = None |
2425 connector = None |
2426 for input_connector in block.GetConnectors()["inputs"]: |
2426 if wire is not None: |
2427 if input_connector.IsCompatible( |
2427 for input_connector in block.GetConnectors()["inputs"]: |
2428 wire.GetStartConnectedType()): |
2428 if input_connector.IsCompatible( |
2429 connector = input_connector |
2429 wire.GetStartConnectedType()): |
2430 break |
2430 connector = input_connector |
|
2431 break |
2431 self.AddNewElement(block, bbox, wire, connector) |
2432 self.AddNewElement(block, bbox, wire, connector) |
2432 dialog.Destroy() |
2433 dialog.Destroy() |
2433 |
2434 |
2434 def AddNewVariable(self, bbox, exclude_input=False, wire=None): |
2435 def AddNewVariable(self, bbox, exclude_input=False, wire=None): |
2435 dialog = FBDVariableDialog(self.ParentWindow, self.Controler, self.TagName, exclude_input) |
2436 dialog = FBDVariableDialog(self.ParentWindow, self.Controler, self.TagName, exclude_input) |