Ensure cursor is visible after switching focus mode (#1478)

This commit is contained in:
Veronica Berglyd Olsen
2023-11-18 15:43:51 +01:00
parent 17fc370609
commit 208b9334e1
3 changed files with 79 additions and 5 deletions
+4
View File
@@ -1166,6 +1166,7 @@ class GuiMain(QMainWindow):
else:
logger.debug("Deactivating Focus Mode")
cursorVisible = self.docEditor.cursorIsVisible()
isVisible = not self.isFocusMode
self.treePane.setVisible(isVisible)
self.mainStatus.setVisible(isVisible)
@@ -1181,6 +1182,9 @@ class GuiMain(QMainWindow):
elif self.docViewer.docHandle is not None:
self.splitView.setVisible(True)
if cursorVisible:
self.docEditor.ensureCursorVisibleNoCentre()
return
@pyqtSlot(nwWidget)