Tie things together to ensure title is always updated, and add some needed comments here and there

This commit is contained in:
Veronica K. B. Olsen
2020-05-01 18:11:32 +02:00
parent 7d91a15841
commit cc1113ea6c
5 changed files with 82 additions and 6 deletions
+15
View File
@@ -63,6 +63,10 @@ class GuiDocTitleBar(QLabel):
return
##
# Setters
##
def setTitleFromHandle(self, tHandle):
"""Sets the document title from the handle, or alternatively,
set the whole document path.
@@ -91,4 +95,15 @@ class GuiDocTitleBar(QLabel):
return True
##
# Events
##
def mousePressEvent(self, theEvent):
"""Capture a click on the title and ensure that the item is
selected in the project tree.
"""
self.theParent.treeView.setSelectedHandle(self.theHandle)
return
# END Class GuiDocTitleBar