Renaming the document root and components from the tree

This commit is contained in:
2026-07-26 16:14:51 +02:00
parent a96bde9642
commit d9304ba2e0
6 changed files with 98 additions and 30 deletions

View File

@@ -7,11 +7,7 @@ from bedit_gui.views.models.document_tree_model import DocumentTreeModel
class DocumentTreeController(QObject):
def __init__(
self,
document: Document,
window: MainWindow,
) -> None:
def __init__(self,document: Document,window: MainWindow) -> None:
super().__init__(window)
self.document = document
@@ -20,6 +16,8 @@ class DocumentTreeController(QObject):
window.ui.documentTree.setModel(self.model)
document.model_changed.connect(self._on_document_changed)
self.model.rename_document_requested.connect(self.document.rename)
self.model.rename_component_requested.connect(self.document.rename_component)
window.ui.documentTree.setHeaderHidden(True)