From 9a5f87073f5191a7785ff383d8bc659056582adc Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sun, 13 Dec 2020 20:10:24 +0100 Subject: [PATCH] Fix the Focus Mode checkbox not updating in the menu --- nw/gui/mainmenu.py | 2 +- nw/guimain.py | 1 + sample/nwProject.nwx | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nw/gui/mainmenu.py b/nw/gui/mainmenu.py index 861126c2..f49abc2a 100644 --- a/nw/gui/mainmenu.py +++ b/nw/gui/mainmenu.py @@ -484,7 +484,7 @@ class GuiMainMenu(QMenuBar): self.aFocusMode.setShortcut("F8") self.aFocusMode.setCheckable(True) self.aFocusMode.setChecked(self.theParent.isFocusMode) - self.aFocusMode.toggled.connect(self.theParent.toggleFocusMode) + self.aFocusMode.triggered.connect(lambda: self.theParent.toggleFocusMode()) self.viewMenu.addAction(self.aFocusMode) # View > Toggle Full Screen diff --git a/nw/guimain.py b/nw/guimain.py index 9efc9a2e..16965057 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -1079,6 +1079,7 @@ class GuiMain(QMainWindow): return False self.isFocusMode = not self.isFocusMode + self.mainMenu.aFocusMode.setChecked(self.isFocusMode) if self.isFocusMode: logger.debug("Activating Focus Mode") self.tabWidget.setCurrentWidget(self.splitDocs) diff --git a/sample/nwProject.nwx b/sample/nwProject.nwx index c5a21f08..4a7f45d3 100644 --- a/sample/nwProject.nwx +++ b/sample/nwProject.nwx @@ -1,13 +1,13 @@ - + Sample Project Sample Project Jane Smith Jay Doh - 805 + 810 153 - 39146 + 39261 False