mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pyqt6: Fix some keyboard modifiers checks in the editor
This commit is contained in:
parent
a5257b532f
commit
7cb53c9c96
@ -42,7 +42,7 @@ def get_leading_whitespace_on_block(editor, previous=False):
|
||||
def no_modifiers(ev, *args):
|
||||
mods = ev.modifiers()
|
||||
for mod_mask in args:
|
||||
if int(mods & mod_mask):
|
||||
if mods & mod_mask:
|
||||
return False
|
||||
return True
|
||||
|
||||
@ -50,7 +50,7 @@ def no_modifiers(ev, *args):
|
||||
def test_modifiers(ev, *args):
|
||||
mods = ev.modifiers()
|
||||
for mod_mask in args:
|
||||
if not int(mods & mod_mask):
|
||||
if not mods & mod_mask:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user