Only switch focus between editor and viewer when viewer is visible (#1950)

This commit is contained in:
Veronica Berglyd Olsen
2024-07-03 18:38:32 +02:00
parent e1bcfcfc05
commit 42b1e6a559
+3 -2
View File
@@ -1023,9 +1023,10 @@ class GuiMain(QMainWindow):
self.projView.setTreeFocus()
elif paneNo == nwFocus.DOCUMENT:
self._changeView(nwView.EDITOR)
if self.docEditor.anyFocus():
hasViewer = self.splitView.isVisible()
if hasViewer and self.docEditor.anyFocus():
self.docViewer.setFocus()
elif self.docViewer.anyFocus():
elif hasViewer and self.docViewer.anyFocus():
self.docEditor.setFocus()
else:
self.docEditor.setFocus()