mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-15 10:22:26 +12:00
Display bug corrected in outline view
This commit is contained in:
parent
d4268813f6
commit
9f0c5fe527
|
@ -42,6 +42,12 @@ class characterModel(QAbstractItemModel):
|
|||
else:
|
||||
return ""
|
||||
|
||||
elif role == Qt.DecorationRole:
|
||||
if index.column() == C.name.value:
|
||||
return c.icon
|
||||
else:
|
||||
return QVariant()
|
||||
|
||||
elif type(c) == CharacterInfo:
|
||||
if role == Qt.DisplayRole or role == Qt.EditRole:
|
||||
if index.column() == 0:
|
||||
|
|
|
@ -278,7 +278,7 @@ class outlineStatusDelegate(QStyledItemDelegate):
|
|||
def paint(self, painter, option, index):
|
||||
QStyledItemDelegate.paint(self, painter, option, index)
|
||||
|
||||
if index.isValid() and index.internalPointer().data(Outline.status.value) not in ["", None, "0"]:
|
||||
if index.isValid() and index.internalPointer().data(Outline.status.value) not in ["", None, "0", 0]:
|
||||
opt = QStyleOptionComboBox()
|
||||
opt.rect = option.rect
|
||||
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow)
|
||||
|
@ -344,7 +344,7 @@ class outlineLabelDelegate(QStyledItemDelegate):
|
|||
qApp.style().drawControl(QStyle.CE_ItemViewItem, opt, painter)
|
||||
|
||||
# Drop down indicator
|
||||
if index.isValid() and index.internalPointer().data(Outline.label.value) not in ["", None, "0"]:
|
||||
if index.isValid() and index.internalPointer().data(Outline.label.value) not in ["", None, "0", 0]:
|
||||
opt = QStyleOptionComboBox()
|
||||
opt.rect = option.rect
|
||||
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow)
|
||||
|
|
Loading…
Reference in a new issue