Clean up function mappings in project tree class

This commit is contained in:
Veronica Berglyd Olsen
2022-10-25 15:47:40 +02:00
parent e89f004532
commit 2ee6adcf35
6 changed files with 79 additions and 74 deletions
+4 -8
View File
@@ -807,15 +807,11 @@ class GuiMain(QMainWindow):
logger.error("No project open")
return False
if tHandle is None:
if self.docEditor.anyFocus() or self.isFocusMode:
tHandle = self.docEditor.docHandle()
else:
tHandle = self.projView.getSelectedHandle()
if tHandle:
return self.projView.renameTreeItem(tHandle)
if tHandle is None and (self.docEditor.anyFocus() or self.isFocusMode):
tHandle = self.docEditor.docHandle()
self.projView.renameTreeItem(tHandle)
return False
return True
def rebuildTrees(self):
"""Rebuild the project tree.