mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-13 05:11:47 +08:00
Use Alt modifier to move camera center (center of rotation) up or down
This commit is contained in:
parent
45922e6f5d
commit
6563a5fe9a
@ -218,7 +218,16 @@ sub mouse_event {
|
||||
$self->_dragged(1);
|
||||
$self->Refresh;
|
||||
} elsif ($e->Dragging) {
|
||||
if ($e->LeftIsDown) {
|
||||
if ($e->AltDown) {
|
||||
# Move the camera center on the Z axis based on mouse Y axis movement
|
||||
if (defined $self->_drag_start_pos) {
|
||||
my $orig = $self->_drag_start_pos;
|
||||
$self->_camera_target->translate(0, 0, $pos->y - $orig->y);
|
||||
$self->on_viewport_changed->() if $self->on_viewport_changed;
|
||||
$self->Refresh;
|
||||
}
|
||||
$self->_drag_start_pos($pos);
|
||||
} elsif ($e->LeftIsDown) {
|
||||
# if dragging over blank area with left button, rotate
|
||||
if (defined $self->_drag_start_pos) {
|
||||
my $orig = $self->_drag_start_pos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user