mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
#5333 - Reworked navigation of preview's sliders using the keyboard
This commit is contained in:
parent
982e6eb55b
commit
6ae1a10614
8 changed files with 102 additions and 2 deletions
|
@ -1078,7 +1078,11 @@ wxDEFINE_EVENT(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED, SimpleEvent);
|
|||
wxDEFINE_EVENT(EVT_GLCANVAS_UPDATE_BED_SHAPE, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLCANVAS_TAB, SimpleEvent);
|
||||
wxDEFINE_EVENT(EVT_GLCANVAS_RESETGIZMOS, SimpleEvent);
|
||||
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
|
||||
wxDEFINE_EVENT(EVT_GLCANVAS_MOVE_SLIDERS, wxKeyEvent);
|
||||
#else
|
||||
wxDEFINE_EVENT(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, wxKeyEvent);
|
||||
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
|
||||
wxDEFINE_EVENT(EVT_GLCANVAS_EDIT_COLOR_CHANGE, wxKeyEvent);
|
||||
wxDEFINE_EVENT(EVT_GLCANVAS_JUMP_TO, wxKeyEvent);
|
||||
wxDEFINE_EVENT(EVT_GLCANVAS_UNDO, SimpleEvent);
|
||||
|
@ -2818,7 +2822,11 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
|
|||
keyCode == WXK_UP ||
|
||||
keyCode == WXK_DOWN) {
|
||||
if (dynamic_cast<Preview*>(m_canvas->GetParent()) != nullptr)
|
||||
#if ENABLE_ARROW_KEYS_WITH_SLIDERS
|
||||
post_event(wxKeyEvent(EVT_GLCANVAS_MOVE_SLIDERS, evt));
|
||||
#else
|
||||
post_event(wxKeyEvent(EVT_GLCANVAS_MOVE_LAYERS_SLIDER, evt));
|
||||
#endif // ENABLE_ARROW_KEYS_WITH_SLIDERS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue