Renaming the document root and components from the tree
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user