Add Alt+4 focus key, and switch main tab on focus change

This commit is contained in:
Veronica K. B. Olsen
2021-01-28 21:04:22 +01:00
parent 815f24fbf5
commit 045929681d
3 changed files with 14 additions and 2 deletions
+6 -1
View File
@@ -1128,14 +1128,19 @@ class GuiMain(QMainWindow):
return True
def setFocus(self, paneNo):
"""Switch focus to one of the three main GUI panes.
"""Switch focus between main GUI views.
"""
if paneNo == 1:
self.treeView.setFocus()
elif paneNo == 2:
self.mainTabs.setCurrentWidget(self.splitDocs)
self.docEditor.setFocus()
elif paneNo == 3:
self.mainTabs.setCurrentWidget(self.splitDocs)
self.docViewer.setFocus()
elif paneNo == 4:
self.mainTabs.setCurrentWidget(self.splitOutline)
self.projView.setFocus()
return
def closeDocEditor(self):