From 967037ff893b0cb1e39cfa968dc4fa59ff2fd915 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 31 Oct 2020 17:49:32 +0100 Subject: [PATCH] Clear the outline details panel when closing a project --- nw/gui/outlinedetails.py | 21 +++++++++++++++++++++ nw/guimain.py | 1 + 2 files changed, 22 insertions(+) diff --git a/nw/gui/outlinedetails.py b/nw/gui/outlinedetails.py index d19bf2e9..c4e54f16 100644 --- a/nw/gui/outlinedetails.py +++ b/nw/gui/outlinedetails.py @@ -246,6 +246,27 @@ class GuiOutlineDetails(QScrollArea): return + def clearDetails(self): + """Clear all the data labels. + """ + self.titleLabel.setText("Title") + self.titleValue.setText("") + self.fileValue.setText("") + self.itemValue.setText("") + self.cCValue.setText("") + self.wCValue.setText("") + self.pCValue.setText("") + self.synopValue.setText("") + self.povKeyValue.setText("") + self.chrKeyValue.setText("") + self.pltKeyValue.setText("") + self.timKeyValue.setText("") + self.wldKeyValue.setText("") + self.objKeyValue.setText("") + self.entKeyValue.setText("") + self.cstKeyValue.setText("") + return + def showItem(self, tHandle, sTitle): """Update the content of the tree with the given handle and line number pointing to a header. diff --git a/nw/guimain.py b/nw/guimain.py index 9b1a8a42..1a6b5a16 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -345,6 +345,7 @@ class GuiMain(QMainWindow): self.closeDocument() self.docViewer.clearNavHistory() self.projView.closeOutline() + self.projMeta.clearDetails() self.theProject.closeProject() self.theIndex.clearIndex() self.clearGUI()