Merge pull request #559 from vkbo/fix_clear_treemeta
Backport from 1.1: clear project tree meta panel on close
This commit is contained in:
+17
-11
@@ -190,6 +190,22 @@ class GuiItemDetails(QWidget):
|
|||||||
# Class Methods
|
# Class Methods
|
||||||
##
|
##
|
||||||
|
|
||||||
|
def clearDetails(self):
|
||||||
|
"""Clear all the data values.
|
||||||
|
"""
|
||||||
|
self.labelFlag.setPixmap(QPixmap(1, 1))
|
||||||
|
self.labelData.setText("")
|
||||||
|
self.statusFlag.setPixmap(QPixmap(1, 1))
|
||||||
|
self.statusData.setText("")
|
||||||
|
self.classFlag.setText("")
|
||||||
|
self.classData.setText("")
|
||||||
|
self.layoutFlag.setText("")
|
||||||
|
self.layoutData.setText("")
|
||||||
|
self.cCountData.setText("–")
|
||||||
|
self.wCountData.setText("–")
|
||||||
|
self.pCountData.setText("–")
|
||||||
|
return
|
||||||
|
|
||||||
def updateCounts(self, tHandle, cC, wC, pC):
|
def updateCounts(self, tHandle, cC, wC, pC):
|
||||||
"""Just update the counts if the handle is the same as the one
|
"""Just update the counts if the handle is the same as the one
|
||||||
we're already showing.
|
we're already showing.
|
||||||
@@ -207,17 +223,7 @@ class GuiItemDetails(QWidget):
|
|||||||
nwItem = self.theProject.projTree[tHandle]
|
nwItem = self.theProject.projTree[tHandle]
|
||||||
|
|
||||||
if nwItem is None:
|
if nwItem is None:
|
||||||
self.labelFlag.setText("")
|
self.clearDetails()
|
||||||
self.labelData.setText("")
|
|
||||||
self.statusFlag.setText("")
|
|
||||||
self.statusData.setText("")
|
|
||||||
self.classFlag.setText("")
|
|
||||||
self.classData.setText("")
|
|
||||||
self.layoutFlag.setText("")
|
|
||||||
self.layoutData.setText("")
|
|
||||||
self.cCountData.setText("–")
|
|
||||||
self.wCountData.setText("–")
|
|
||||||
self.pCountData.setText("–")
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
theLabel = nwItem.itemName
|
theLabel = nwItem.itemName
|
||||||
|
|||||||
@@ -252,10 +252,17 @@ class GuiMain(QMainWindow):
|
|||||||
def clearGUI(self):
|
def clearGUI(self):
|
||||||
"""Wrapper function to clear all sub-elements of the main GUI.
|
"""Wrapper function to clear all sub-elements of the main GUI.
|
||||||
"""
|
"""
|
||||||
|
# Project Area
|
||||||
self.treeView.clearTree()
|
self.treeView.clearTree()
|
||||||
|
self.treeMeta.clearDetails()
|
||||||
|
|
||||||
|
# Work Area
|
||||||
self.docEditor.clearEditor()
|
self.docEditor.clearEditor()
|
||||||
self.closeDocViewer()
|
self.closeDocViewer()
|
||||||
|
|
||||||
|
# General
|
||||||
self.statusBar.clearStatus()
|
self.statusBar.clearStatus()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def initMain(self):
|
def initMain(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user