Added handling of orphaned documents.

This commit is contained in:
Veronica K. B. Olsen
2019-04-28 19:37:39 +02:00
parent 880b8905ee
commit 664efbc6d2
7 changed files with 100 additions and 21 deletions
+13 -10
View File
@@ -64,17 +64,20 @@ class GuiDocDetails(QFrame):
def buildViewBox(self, tHandle):
nwItem = self.theProject.getItem(tHandle)
itemStatus = nwItem.itemStatus
if itemStatus < 0 or itemStatus >= len(self.theProject.statusLabels):
itemStatus = 0
nwItem = self.theProject.getItem(tHandle)
colTwo = [
nwItem.itemName,
self.theProject.statusLabels[itemStatus],
nwLabels.CLASS_NAME[nwItem.itemClass],
nwLabels.LAYOUT_NAME[nwItem.itemLayout],
]
if nwItem is None:
colTwo = [""]*4
else:
itemStatus = nwItem.itemStatus
if itemStatus < 0 or itemStatus >= len(self.theProject.statusLabels):
itemStatus = 0
colTwo = [
nwItem.itemName,
self.theProject.statusLabels[itemStatus],
nwLabels.CLASS_NAME[nwItem.itemClass],
nwLabels.LAYOUT_NAME[nwItem.itemLayout],
]
for nRow in range(4):
lblTwo = QLabel(colTwo[nRow])