mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Layerview now uses ctrl+ arrow to move through layers (just like legacy cura)
This commit is contained in:
parent
d72ec68d8c
commit
4639be180d
1 changed files with 7 additions and 1 deletions
|
@ -13,6 +13,8 @@ from UM.Mesh.MeshData import MeshData
|
|||
|
||||
from cura.ConvexHullNode import ConvexHullNode
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from . import LayerViewProxy
|
||||
|
||||
## View used to display g-code paths.
|
||||
|
@ -162,8 +164,12 @@ class LayerView(View):
|
|||
pass
|
||||
|
||||
def event(self, event):
|
||||
if event.type == Event.KeyPressEvent:
|
||||
modifiers = QtWidgets.QApplication.keyboardModifiers()
|
||||
ctrl_is_active = modifiers == QtCore.Qt.ControlModifier
|
||||
if event.type == Event.KeyPressEvent and ctrl_is_active:
|
||||
if event.key == KeyEvent.UpKey:
|
||||
self.setLayer(self._current_layer_num + 1)
|
||||
return True
|
||||
if event.key == KeyEvent.DownKey:
|
||||
self.setLayer(self._current_layer_num - 1)
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue