The isExported option should only apply to files
This commit is contained in:
+1
-1
@@ -1350,8 +1350,8 @@ class NWItem():
|
||||
xSub = self._subPack(xPack,"class", text=str(self.itemClass.name))
|
||||
xSub = self._subPack(xPack,"status", text=str(self.itemStatus))
|
||||
xSub = self._subPack(xPack,"expanded", text=str(self.isExpanded))
|
||||
xSub = self._subPack(xPack,"exported", text=str(self.isExported))
|
||||
if self.itemType == nwItemType.FILE:
|
||||
xSub = self._subPack(xPack,"exported", text=str(self.isExported))
|
||||
xSub = self._subPack(xPack,"layout", text=str(self.itemLayout.name))
|
||||
xSub = self._subPack(xPack,"charCount", text=str(self.charCount), none=False)
|
||||
xSub = self._subPack(xPack,"wordCount", text=str(self.wordCount), none=False)
|
||||
|
||||
@@ -105,9 +105,14 @@ class GuiItemEditor(QDialog):
|
||||
if itemLayout in self.validLayouts:
|
||||
self.editLayout.addItem(nwLabels.LAYOUT_NAME[itemLayout],itemLayout)
|
||||
|
||||
self.editExport = QSwitch()
|
||||
self.editExport.setChecked(self.theItem.isExported)
|
||||
self.textExport = QLabel("Include when building project")
|
||||
self.editExport = QSwitch()
|
||||
if self.theItem.itemType == nwItemType.FILE:
|
||||
self.editExport.setEnabled(True)
|
||||
self.editExport.setChecked(self.theItem.isExported)
|
||||
else:
|
||||
self.editExport.setEnabled(False)
|
||||
self.editExport.setChecked(False)
|
||||
|
||||
self.mainForm.addWidget(QLabel("Label"), 0, 0)
|
||||
self.mainForm.addWidget(self.editName, 0, 1, 1, 2)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user