mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 11:29:07 +08:00
Step by 10 layers with shift key down
This commit is contained in:
parent
a6bc2b07f8
commit
0fa32c3c16
@ -285,13 +285,15 @@ class LayerView(View):
|
||||
|
||||
def event(self, event):
|
||||
modifiers = QApplication.keyboardModifiers()
|
||||
ctrl_is_active = modifiers == Qt.ControlModifier
|
||||
ctrl_is_active = modifiers & Qt.ControlModifier
|
||||
shift_is_active = modifiers & Qt.ShiftModifier
|
||||
if event.type == Event.KeyPressEvent and ctrl_is_active:
|
||||
amount = 10 if shift_is_active else 1
|
||||
if event.key == KeyEvent.UpKey:
|
||||
self.setLayer(self._current_layer_num + 1)
|
||||
self.setLayer(self._current_layer_num + amount)
|
||||
return True
|
||||
if event.key == KeyEvent.DownKey:
|
||||
self.setLayer(self._current_layer_num - 1)
|
||||
self.setLayer(self._current_layer_num - amount)
|
||||
return True
|
||||
|
||||
if event.type == Event.ViewActivateEvent:
|
||||
|
Loading…
x
Reference in New Issue
Block a user