Skip to content

Commit

Permalink
fix matches mainwindow
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbautista committed Nov 5, 2024
1 parent 18fe59f commit e9fc85e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qtconsole/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def init_file_menu(self):
self.file_menu.addSeparator()

printkey = QtGui.QKeySequence(self._shortcuts['shortcut_print'])
if printkey.matches("Ctrl+P") and sys.platform != 'darwin':
if printkey.matches("Ctrl+P") == 2 and sys.platform != 'darwin':
# Only override the default if there is a collision.
# Qt ctrl = cmd on OSX, so the match gets a false positive on OSX.
self._shortcuts['shortcut_print'] = "Ctrl+Shift+P"
Expand Down Expand Up @@ -505,7 +505,7 @@ def init_edit_menu(self):
self.edit_menu.addSeparator()

selectall = QtGui.QKeySequence(self._shortcuts['shortcut_select_all'])
if selectall.matches("Ctrl+A") and sys.platform != 'darwin':
if selectall.matches("Ctrl+A") == 2 and sys.platform != 'darwin':
# Only override the default if there is a collision.
# Qt ctrl = cmd on OSX, so the match gets a false positive on OSX.
self._shortcuts['shortcut_select_all'] = "Ctrl+Shift+A"
Expand Down

0 comments on commit e9fc85e

Please sign in to comment.