Skip to content

Commit

Permalink
Fix more crashes when clicking outline
Browse files Browse the repository at this point in the history
A few more places in my previous commit didn't break in my "test"
project (presumably because they weren't being drawn), but after
switching back to a real project, they broke again.

This does more of the same thing (using `None` instead of relying on the
default argument, which is missing)
  • Loading branch information
ByteOfBrie committed Aug 13, 2024
1 parent f35534a commit 57d7a78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manuskript/ui/views/outlineDelegates.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def paint(self, painter, option, index):
if itemIndex.isValid() and self.mdlCharacter.data(itemIndex) not in ["", None]:
opt = QStyleOptionComboBox()
opt.rect = option.rect
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow)
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow, None)
option.rect = r
qApp.style().drawPrimitive(QStyle.PE_IndicatorArrowDown, option, painter)

Expand Down Expand Up @@ -295,7 +295,7 @@ def paint(self, painter, option, index):
if index.isValid() and index.internalPointer().data(Outline.status) not in ["", None, "0", 0]:
opt = QStyleOptionComboBox()
opt.rect = option.rect
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow)
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow, None)
option.rect = r
qApp.style().drawPrimitive(QStyle.PE_IndicatorArrowDown, option, painter)

Expand Down Expand Up @@ -361,6 +361,6 @@ def paint(self, painter, option, index):
if index.isValid() and index.internalPointer().data(Outline.label) not in ["", None, "0", 0]:
opt = QStyleOptionComboBox()
opt.rect = option.rect
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow)
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow, None)
option.rect = r
qApp.style().drawPrimitive(QStyle.PE_IndicatorArrowDown, option, painter)

0 comments on commit 57d7a78

Please sign in to comment.