Skip to content

Commit

Permalink
Fix shift focus to novel tree on Alt+1 when visible
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo committed Oct 23, 2021
1 parent a25432f commit 7f44e86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion novelwriter/guimain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,11 @@ def switchFocus(self, paneNo):
"""Switch focus between main GUI views.
"""
if paneNo == nwWidget.TREE:
self.treeView.setFocus()
tabIdx = self.projTabs.currentIndex()
if tabIdx == self.idxTreeView:
self.treeView.setFocus()
elif tabIdx == self.idxNovelView:
self.novelView.setFocus()
elif paneNo == nwWidget.EDITOR:
self.mainTabs.setCurrentWidget(self.splitDocs)
self.docEditor.setFocus()
Expand Down

0 comments on commit 7f44e86

Please sign in to comment.