Skip to content

Commit 7f44e86

Browse files
committed
Fix shift focus to novel tree on Alt+1 when visible
1 parent a25432f commit 7f44e86

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

novelwriter/guimain.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,11 @@ def switchFocus(self, paneNo):
12191219
"""Switch focus between main GUI views.
12201220
"""
12211221
if paneNo == nwWidget.TREE:
1222-
self.treeView.setFocus()
1222+
tabIdx = self.projTabs.currentIndex()
1223+
if tabIdx == self.idxTreeView:
1224+
self.treeView.setFocus()
1225+
elif tabIdx == self.idxNovelView:
1226+
self.novelView.setFocus()
12231227
elif paneNo == nwWidget.EDITOR:
12241228
self.mainTabs.setCurrentWidget(self.splitDocs)
12251229
self.docEditor.setFocus()

0 commit comments

Comments
 (0)