mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Step by 10 layers with shift key down
This commit is contained in:
parent
a6bc2b07f8
commit
0fa32c3c16
1 changed files with 5 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue