diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm index 5663054f1..6af777b3a 100644 --- a/lib/Slic3r/GUI/Plater/3DPreview.pm +++ b/lib/Slic3r/GUI/Plater/3DPreview.pm @@ -92,11 +92,11 @@ sub new { if ($event->HasModifiers) { $event->Skip; } else { - if ($key == ord('U') || $key == WXK_RIGHT) { + if ($key == ord('U')) { $slider_high->SetValue($slider_high->GetValue + 1); $slider_low->SetValue($slider_high->GetValue) if ($event->ShiftDown()); $self->set_z_idx_high($slider_high->GetValue); - } elsif ($key == ord('D') || $key == WXK_LEFT) { + } elsif ($key == ord('D')) { $slider_high->SetValue($slider_high->GetValue - 1); $slider_low->SetValue($slider_high->GetValue) if ($event->ShiftDown()); $self->set_z_idx_high($slider_high->GetValue); @@ -112,6 +112,34 @@ sub new { } } }); + EVT_KEY_DOWN($slider_low, sub { + my ($s, $event) = @_; + my $key = $event->GetKeyCode; + if ($event->HasModifiers) { + $event->Skip; + } else { + if ($key == WXK_LEFT) { + } elsif ($key == WXK_RIGHT) { + $slider_high->SetFocus; + } else { + $event->Skip; + } + } + }); + EVT_KEY_DOWN($slider_high, sub { + my ($s, $event) = @_; + my $key = $event->GetKeyCode; + if ($event->HasModifiers) { + $event->Skip; + } else { + if ($key == WXK_LEFT) { + $slider_low->SetFocus; + } elsif ($key == WXK_RIGHT) { + } else { + $event->Skip; + } + } + }); EVT_CHECKBOX($self, $checkbox_singlelayer, sub { $self->single_layer($checkbox_singlelayer->GetValue()); if ($self->single_layer) {