Skip to content

Commit 078649e

Browse files
committed
pyside6 fix
1 parent c11f6e4 commit 078649e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

PythonEditor/ui/tabs.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -630,18 +630,19 @@ def prompt_user_to_save(self, index):
630630
msg_box.setInformativeText(
631631
'Do you want to save your changes?'
632632
)
633+
_sb = getattr(QMessageBox, 'StandardButton', QMessageBox)
633634
buttons = (
634-
msg_box.Save
635-
| msg_box.Discard
636-
| msg_box.Cancel
635+
_sb.Save
636+
| _sb.Discard
637+
| _sb.Cancel
637638
)
638639
msg_box.setStandardButtons(buttons)
639-
msg_box.setDefaultButton(msg_box.Save)
640+
msg_box.setDefaultButton(_sb.Save)
640641
ret = msg_box.exec_()
641642

642-
user_cancelled = (ret == msg_box.Cancel)
643+
user_cancelled = (ret == _sb.Cancel)
643644

644-
if (ret == msg_box.Save):
645+
if (ret == _sb.Save):
645646
data = self.tabData(index)
646647
path = save.save(
647648
data['text'],

0 commit comments

Comments
 (0)