diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-17 16:15:50 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-17 16:16:23 +0200 |
commit | 7ae4e0f7ba9fa45d9dbcc246b15bec5e57b8ad0c (patch) | |
tree | 4ffd630772d9b9d86cc63145ad5e1905ede9cf8d | |
parent | ca9e54100a338ef0a7ac65e7483bea9e7aac43c0 (diff) |
Allow to override zoom-focus to mouse
When Prefs > Editor > Zoom to mouse position... is disabled.
Ctrl + Scroll now allows to override the current zoom-focus,
and zoom in/out at the mouse-cursor position.
-rw-r--r-- | gtk2_ardour/editor_canvas_events.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index 3e7231972d..a0fd6bc3b0 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -1056,11 +1056,12 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType switch (event->scroll.direction) { case GDK_SCROLL_UP: - if (Keyboard::modifier_state_equals(event->scroll.state, - Keyboard::ScrollHorizontalModifier)) { + if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::ScrollHorizontalModifier)) { scroll_left_step (); } else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) { temporal_zoom_step_mouse_focus (false); + } else if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::PrimaryModifier)) { + temporal_zoom_step_mouse_focus (false); } else { temporal_zoom_step (false); } @@ -1068,11 +1069,12 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType break; case GDK_SCROLL_DOWN: - if (Keyboard::modifier_state_equals(event->scroll.state, - Keyboard::ScrollHorizontalModifier)) { + if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::ScrollHorizontalModifier)) { scroll_right_step (); } else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) { temporal_zoom_step_mouse_focus (true); + } else if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::PrimaryModifier)) { + temporal_zoom_step_mouse_focus (true); } else { temporal_zoom_step (true); } |