Skip to content

Commit 54d2ca1

Browse files
Merge pull request #1315 from ByteOfBrie/fix-outline-crash
Fix crash when clicking outline
2 parents 5d66131 + e1c7cd6 commit 54d2ca1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

manuskript/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def launch(arguments, app, MW = None):
220220
kernel.initialize(['python', '--matplotlib=qt'])
221221

222222
# Create the console in a new process and connect
223-
console = connect_qtconsole(kernel.abs_connection_file, profile=kernel.profile)
223+
console = connect_qtconsole(kernel.abs_connection_file)
224224

225225
# Export MW and app variable to the console's namespace
226226
kernel.shell.user_ns['MW'] = MW

manuskript/ui/editors/fullScreenEditor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def paintEvent(self, event):
525525
# painter.restore()
526526

527527
# slider
528-
r = style.subControlRect(style.CC_ScrollBar, opt, style.SC_ScrollBarSlider)
528+
r = style.subControlRect(style.CC_ScrollBar, opt, style.SC_ScrollBarSlider, None)
529529
painter.fillRect(r, self._color)
530530
painter.end()
531531

manuskript/ui/views/outlineDelegates.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def paint(self, painter, option, index):
2929
opt = QStyleOptionViewItem(option)
3030
self.initStyleOption(opt, index)
3131

32-
iconRect = style.subElementRect(style.SE_ItemViewItemDecoration, opt)
33-
textRect = style.subElementRect(style.SE_ItemViewItemText, opt)
32+
iconRect = style.subElementRect(style.SE_ItemViewItemDecoration, opt, None)
33+
textRect = style.subElementRect(style.SE_ItemViewItemText, opt, None)
3434

3535
# Background
3636
style.drawPrimitive(style.PE_PanelItemViewItem, opt, painter)
@@ -183,7 +183,7 @@ def paint(self, painter, option, index):
183183
if itemIndex.isValid() and self.mdlCharacter.data(itemIndex) not in ["", None]:
184184
opt = QStyleOptionComboBox()
185185
opt.rect = option.rect
186-
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow)
186+
r = qApp.style().subControlRect(QStyle.CC_ComboBox, opt, QStyle.SC_ComboBoxArrow, None)
187187
option.rect = r
188188
qApp.style().drawPrimitive(QStyle.PE_IndicatorArrowDown, option, painter)
189189

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

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

0 commit comments

Comments
 (0)