The isExported option should only apply to files

This commit is contained in:
Veronica K. B. Olsen
2020-05-10 23:24:32 +02:00
parent a7d2ca24a5
commit 0faf1f9986
13 changed files with 40 additions and 63 deletions
+7 -4
View File
@@ -32,7 +32,7 @@ from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QFrame, QGridLayout, QLabel
from nw.constants import nwLabels, nwItemClass, nwUnicode
from nw.constants import nwLabels, nwItemClass, nwItemType, nwUnicode
logger = logging.getLogger(__name__)
@@ -170,10 +170,13 @@ class GuiDocDetails(QFrame):
iStatus = self.theProject.importItems.checkEntry(iStatus) # Make sure it's valid
flagIcon = self.theParent.importIcons[iStatus]
if nwItem.isExported:
exportFlag = nwUnicode.U_CHECK
if nwItem.itemType == nwItemType.FILE:
if nwItem.isExported:
exportFlag = nwUnicode.U_CHECK
else:
exportFlag = " "
else:
exportFlag = " "
exportFlag = "+"
self.labelFlag.setText(exportFlag)
self.statusFlag.setPixmap(flagIcon.pixmap(10, 10))
+12 -6
View File
@@ -412,13 +412,19 @@ class GuiDocTree(QTreeWidget):
tHandle = nwItem.itemHandle
pHandle = nwItem.parHandle
if nwItem.isExported:
tStatus = nwUnicode.U_CHECK
else:
tStatus = " "
tStatus += " "+nwLabels.CLASS_FLAG[nwItem.itemClass]
stExport = " "
stClass = nwLabels.CLASS_FLAG[nwItem.itemClass]
stLayout = ""
if nwItem.itemType == nwItemType.FILE:
tStatus += "."+nwLabels.LAYOUT_FLAG[nwItem.itemLayout]
stLayout = "."+nwLabels.LAYOUT_FLAG[nwItem.itemLayout]
if nwItem.isExported:
stExport = nwUnicode.U_CHECK
else:
stExport = "+"
tStatus = stExport+" "+stClass+stLayout
iStatus = nwItem.itemStatus
if tClass == nwItemClass.NOVEL:
iStatus = self.theProject.statusItems.checkEntry(iStatus) # Make sure it's valid