GUI tests working locally when headless.

This commit is contained in:
Veronica K. B. Olsen
2019-05-17 01:55:37 +02:00
parent 13cb526ff5
commit bc39ec7886
4 changed files with 53 additions and 32 deletions
+10 -9
View File
@@ -282,15 +282,16 @@ class GuiDocTree(QTreeWidget):
def propagateCount(self, tHandle, theCount, nDepth=0):
tItem = self._getTreeItem(tHandle)
tItem.setText(self.C_COUNT,str(theCount))
pItem = tItem.parent()
if pItem is not None:
pCount = 0
for i in range(pItem.childCount()):
pCount += int(pItem.child(i).text(self.C_COUNT))
pHandle = pItem.text(self.C_HANDLE)
if not nDepth > 200 and pHandle != "":
self.propagateCount(pHandle, pCount, nDepth+1)
if tItem is not None:
tItem.setText(self.C_COUNT,str(theCount))
pItem = tItem.parent()
if pItem is not None:
pCount = 0
for i in range(pItem.childCount()):
pCount += int(pItem.child(i).text(self.C_COUNT))
pHandle = pItem.text(self.C_HANDLE)
if not nDepth > 200 and pHandle != "":
self.propagateCount(pHandle, pCount, nDepth+1)
return
def buildTree(self):