Fix display text issues in varuious GUI elements
This commit is contained in:
@@ -75,11 +75,20 @@ class GuiItemEditor(QDialog):
|
|||||||
self.editStatus = QComboBox()
|
self.editStatus = QComboBox()
|
||||||
self.editStatus.setMinimumWidth(mVd)
|
self.editStatus.setMinimumWidth(mVd)
|
||||||
if self.theItem.itemClass in nwLists.CLS_NOVEL:
|
if self.theItem.itemClass in nwLists.CLS_NOVEL:
|
||||||
for sLabel, _, _, sIcon in self.theProject.statusItems:
|
for key, entry in self.theProject.statusItems.items():
|
||||||
self.editStatus.addItem(sIcon, sLabel, sLabel)
|
self.editStatus.addItem(entry["icon"], entry["name"], key)
|
||||||
|
|
||||||
|
index = self.editStatus.findData(self.theItem.itemStatus)
|
||||||
|
if index != -1:
|
||||||
|
self.editStatus.setCurrentIndex(index)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
for sLabel, _, _, sIcon in self.theProject.importItems:
|
for key, entry in self.theProject.importItems.items():
|
||||||
self.editStatus.addItem(sIcon, sLabel, sLabel)
|
self.editStatus.addItem(entry["icon"], entry["name"], key)
|
||||||
|
|
||||||
|
index = self.editStatus.findData(self.theItem.itemImport)
|
||||||
|
if index != -1:
|
||||||
|
self.editStatus.setCurrentIndex(index)
|
||||||
|
|
||||||
# Item Layout
|
# Item Layout
|
||||||
self.editLayout = QComboBox()
|
self.editLayout = QComboBox()
|
||||||
@@ -97,6 +106,10 @@ class GuiItemEditor(QDialog):
|
|||||||
if itemLayout in validLayouts:
|
if itemLayout in validLayouts:
|
||||||
self.editLayout.addItem(trConst(nwLabels.LAYOUT_NAME[itemLayout]), itemLayout)
|
self.editLayout.addItem(trConst(nwLabels.LAYOUT_NAME[itemLayout]), itemLayout)
|
||||||
|
|
||||||
|
index = self.editLayout.findData(self.theItem.itemLayout)
|
||||||
|
if index != -1:
|
||||||
|
self.editLayout.setCurrentIndex(index)
|
||||||
|
|
||||||
# Export Switch
|
# Export Switch
|
||||||
self.textExport = QLabel(self.tr("Include when building project"))
|
self.textExport = QLabel(self.tr("Include when building project"))
|
||||||
self.editExport = QSwitch()
|
self.editExport = QSwitch()
|
||||||
@@ -116,15 +129,6 @@ class GuiItemEditor(QDialog):
|
|||||||
self.editName.setText(self.theItem.itemName)
|
self.editName.setText(self.theItem.itemName)
|
||||||
self.editName.selectAll()
|
self.editName.selectAll()
|
||||||
|
|
||||||
currStatus, _ = self.theItem.getImportStatus()
|
|
||||||
statusIdx = self.editStatus.findData(currStatus)
|
|
||||||
if statusIdx != -1:
|
|
||||||
self.editStatus.setCurrentIndex(statusIdx)
|
|
||||||
|
|
||||||
layoutIdx = self.editLayout.findData(self.theItem.itemLayout)
|
|
||||||
if layoutIdx != -1:
|
|
||||||
self.editLayout.setCurrentIndex(layoutIdx)
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Assemble
|
# Assemble
|
||||||
##
|
##
|
||||||
|
|||||||
@@ -294,8 +294,8 @@ class GuiProjectEditStatus(QWidget):
|
|||||||
self.listBox.setColumnWidth(self.COL_LABEL, wCol0)
|
self.listBox.setColumnWidth(self.COL_LABEL, wCol0)
|
||||||
self.listBox.setIndentation(0)
|
self.listBox.setIndentation(0)
|
||||||
|
|
||||||
for key, data in self.theStatus.items():
|
for key, entry in self.theStatus.items():
|
||||||
self._addItem(key, data["name"], data["cols"], data["count"])
|
self._addItem(key, entry["name"], entry["cols"], entry["count"])
|
||||||
|
|
||||||
# List Controls
|
# List Controls
|
||||||
# =============
|
# =============
|
||||||
|
|||||||
@@ -291,8 +291,10 @@ class GuiOutlineDetails(QScrollArea):
|
|||||||
self.titleLabel.setText("<b>%s</b>" % self.tr("Title"))
|
self.titleLabel.setText("<b>%s</b>" % self.tr("Title"))
|
||||||
self.titleValue.setText(novIdx["title"])
|
self.titleValue.setText(novIdx["title"])
|
||||||
|
|
||||||
|
itemStatus, _ = nwItem.getImportStatus()
|
||||||
|
|
||||||
self.fileValue.setText(nwItem.itemName)
|
self.fileValue.setText(nwItem.itemName)
|
||||||
self.itemValue.setText(nwItem.itemStatus)
|
self.itemValue.setText(itemStatus)
|
||||||
|
|
||||||
cC = checkInt(novIdx["cCount"], 0)
|
cC = checkInt(novIdx["cCount"], 0)
|
||||||
wC = checkInt(novIdx["wCount"], 0)
|
wC = checkInt(novIdx["wCount"], 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user