mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 03:08:59 +08:00
Use correct keyboard enums
This commit is contained in:
parent
f176924c2a
commit
96444dbc09
@ -107,8 +107,8 @@ class CuraSceneController(QObject):
|
||||
"""Either select or deselect an item"""
|
||||
|
||||
modifiers = QApplication.keyboardModifiers()
|
||||
ctrl_is_active = modifiers & Qt.ControlModifier
|
||||
shift_is_active = modifiers & Qt.ShiftModifier
|
||||
ctrl_is_active = modifiers & Qt.KeyboardModifier.ControlModifier
|
||||
shift_is_active = modifiers & Qt.KeyboardModifier.ShiftModifier
|
||||
|
||||
if ctrl_is_active:
|
||||
item = self._objects_model.getItem(index)
|
||||
|
@ -598,8 +598,8 @@ class SimulationView(CuraView):
|
||||
|
||||
def event(self, event) -> bool:
|
||||
modifiers = QApplication.keyboardModifiers()
|
||||
ctrl_is_active = modifiers & Qt.ControlModifier
|
||||
shift_is_active = modifiers & Qt.ShiftModifier
|
||||
ctrl_is_active = modifiers & Qt.KeyboardModifier.ControlModifier
|
||||
shift_is_active = modifiers & Qt.KeyboardModifier.ShiftModifier
|
||||
if event.type == Event.KeyPressEvent and ctrl_is_active:
|
||||
amount = 10 if shift_is_active else 1
|
||||
if event.key == KeyEvent.UpKey:
|
||||
|
@ -53,7 +53,7 @@ class SupportEraser(Tool):
|
||||
def event(self, event):
|
||||
super().event(event)
|
||||
modifiers = QApplication.keyboardModifiers()
|
||||
ctrl_is_active = modifiers & Qt.ControlModifier
|
||||
ctrl_is_active = modifiers & Qt.KeyboardModifier.ControlModifier
|
||||
|
||||
if event.type == Event.MousePressEvent and MouseEvent.LeftButton in event.buttons and self._controller.getToolsEnabled():
|
||||
if ctrl_is_active:
|
||||
|
Loading…
x
Reference in New Issue
Block a user