#5333 - Reworked navigation of preview's sliders using the keyboard

This commit is contained in:
enricoturri1966 2020-12-01 08:33:06 +01:00
parent 982e6eb55b
commit 6ae1a10614
8 changed files with 102 additions and 2 deletions

View file

@ -2055,7 +2055,14 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_TAB, [this](SimpleEvent&) { select_next_view_3D(); });
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_COLLAPSE_SIDEBAR, [this](SimpleEvent&) { this->q->collapse_sidebar(!this->q->is_sidebar_collapsed()); });
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_JUMP_TO, [this](wxKeyEvent& evt) { preview->jump_layers_slider(evt); });
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_MOVE_SLIDERS, [this](wxKeyEvent& evt) {
preview->move_layers_slider(evt);
preview->move_moves_slider(evt);
});
#else
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, [this](wxKeyEvent& evt) { preview->move_layers_slider(evt); });
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
preview->get_wxglcanvas()->Bind(EVT_GLCANVAS_EDIT_COLOR_CHANGE, [this](wxKeyEvent& evt) { preview->edit_layers_slider(evt); });
if (wxGetApp().is_editor()) {