basic openmodelica model emitting
This commit is contained in:
@@ -252,6 +252,19 @@ class EditComponentPropertiesCommand(QUndoCommand):
|
||||
self.controller._set_component_properties(self.component_id, self.old)
|
||||
|
||||
|
||||
class EditComponentParametersCommand(QUndoCommand):
|
||||
def __init__(self, controller, component_id: str, old: list, new: list) -> None:
|
||||
super().__init__("Edit component parameters")
|
||||
self.controller, self.component_id = controller, component_id
|
||||
self.old, self.new = old, new
|
||||
|
||||
def redo(self) -> None:
|
||||
self.controller._set_component_parameters(self.component_id, self.new)
|
||||
|
||||
def undo(self) -> None:
|
||||
self.controller._set_component_parameters(self.component_id, self.old)
|
||||
|
||||
|
||||
class RenameInterfacePortCommand(QUndoCommand):
|
||||
def __init__(self, controller, owner_id: str, port_id: str, old: str, new: str) -> None:
|
||||
super().__init__("Rename interface port")
|
||||
|
||||
Reference in New Issue
Block a user