Small fixes and bigger library
This commit is contained in:
@@ -369,12 +369,22 @@ class Document(QObject):
|
||||
command.component.name = self._unique_component_name(component.implementation.graph.components, command.component.name)
|
||||
self.undo_stack.push(command)
|
||||
|
||||
def add_empty_root_graph_component(self) -> None:
|
||||
command = AddEmptyGraphComponent(self, self.model.root)
|
||||
command.component.name = self._unique_component_name(self.model.root, command.component.name)
|
||||
self.undo_stack.push(command)
|
||||
|
||||
def add_empty_equation_component(self, component: Component) -> None:
|
||||
if isinstance(component.implementation, GraphImplementation):
|
||||
command = AddEmptyEquationComponent(self, component)
|
||||
command.component.name = self._unique_component_name(component.implementation.graph.components, command.component.name)
|
||||
self.undo_stack.push(command)
|
||||
|
||||
def add_empty_root_equation_component(self) -> None:
|
||||
command = AddEmptyEquationComponent(self, self.model.root)
|
||||
command.component.name = self._unique_component_name(self.model.root, command.component.name)
|
||||
self.undo_stack.push(command)
|
||||
|
||||
def delete_component(self, component: Component) -> None:
|
||||
self.undo_stack.push(DeleteComponent(self, component))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user