Make sure toolbar is hidden when document is closed
This commit is contained in:
@@ -138,7 +138,6 @@ class GuiDocEditor(QPlainTextEdit):
|
|||||||
self.docFooter = GuiDocEditFooter(self)
|
self.docFooter = GuiDocEditFooter(self)
|
||||||
self.docSearch = GuiDocEditSearch(self)
|
self.docSearch = GuiDocEditSearch(self)
|
||||||
self.docToolBar = GuiDocToolBar(self)
|
self.docToolBar = GuiDocToolBar(self)
|
||||||
self.docToolBar.setVisible(CONFIG.showEditToolBar)
|
|
||||||
|
|
||||||
# Connect Signals
|
# Connect Signals
|
||||||
self.docHeader.closeDocumentRequest.connect(self._closeCurrentDocument)
|
self.docHeader.closeDocumentRequest.connect(self._closeCurrentDocument)
|
||||||
@@ -410,6 +409,7 @@ class GuiDocEditor(QPlainTextEdit):
|
|||||||
qApp.processEvents()
|
qApp.processEvents()
|
||||||
self.setDocumentChanged(False)
|
self.setDocumentChanged(False)
|
||||||
self._qDocument.clearUndoRedoStacks()
|
self._qDocument.clearUndoRedoStacks()
|
||||||
|
self.docToolBar.setVisible(CONFIG.showEditToolBar)
|
||||||
|
|
||||||
qApp.restoreOverrideCursor()
|
qApp.restoreOverrideCursor()
|
||||||
|
|
||||||
@@ -1196,6 +1196,7 @@ class GuiDocEditor(QPlainTextEdit):
|
|||||||
def _closeCurrentDocument(self) -> None:
|
def _closeCurrentDocument(self) -> None:
|
||||||
"""Close the document. Forwarded to the main Gui."""
|
"""Close the document. Forwarded to the main Gui."""
|
||||||
self.closeDocumentRequest.emit()
|
self.closeDocumentRequest.emit()
|
||||||
|
self.docToolBar.setVisible(False)
|
||||||
return
|
return
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
|
|||||||
Reference in New Issue
Block a user