From 5fbcca35a5ac31dec3dc90df3cc09211999b0092 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 8 Nov 2023 18:16:55 +0100 Subject: [PATCH] Make sure toolbar is hidden when document is closed --- novelwriter/gui/doceditor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index efccc361..f0aa7041 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -138,7 +138,6 @@ class GuiDocEditor(QPlainTextEdit): self.docFooter = GuiDocEditFooter(self) self.docSearch = GuiDocEditSearch(self) self.docToolBar = GuiDocToolBar(self) - self.docToolBar.setVisible(CONFIG.showEditToolBar) # Connect Signals self.docHeader.closeDocumentRequest.connect(self._closeCurrentDocument) @@ -410,6 +409,7 @@ class GuiDocEditor(QPlainTextEdit): qApp.processEvents() self.setDocumentChanged(False) self._qDocument.clearUndoRedoStacks() + self.docToolBar.setVisible(CONFIG.showEditToolBar) qApp.restoreOverrideCursor() @@ -1196,6 +1196,7 @@ class GuiDocEditor(QPlainTextEdit): def _closeCurrentDocument(self) -> None: """Close the document. Forwarded to the main Gui.""" self.closeDocumentRequest.emit() + self.docToolBar.setVisible(False) return @pyqtSlot()