fix match check of save sequence (#5148)

This commit is contained in:
Jakub Trllo 2023-06-16 10:50:38 +02:00 committed by GitHub
parent 6087b27c32
commit f9a64192b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -453,7 +453,11 @@ class PublisherWindow(QtWidgets.QDialog):
return
save_match = event.matches(QtGui.QKeySequence.Save)
if save_match == QtGui.QKeySequence.ExactMatch:
# PySide2 and PySide6 support
if not isinstance(save_match, bool):
save_match = save_match == QtGui.QKeySequence.ExactMatch
if save_match:
if not self._controller.publish_has_started:
self._save_changes(True)
event.accept()