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.
This commit is contained in:
parent
ca9e54100a
commit
7ae4e0f7ba
@ -1056,11 +1056,12 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
|
|||||||
|
|
||||||
switch (event->scroll.direction) {
|
switch (event->scroll.direction) {
|
||||||
case GDK_SCROLL_UP:
|
case GDK_SCROLL_UP:
|
||||||
if (Keyboard::modifier_state_equals(event->scroll.state,
|
if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::ScrollHorizontalModifier)) {
|
||||||
Keyboard::ScrollHorizontalModifier)) {
|
|
||||||
scroll_left_step ();
|
scroll_left_step ();
|
||||||
} else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) {
|
} else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) {
|
||||||
temporal_zoom_step_mouse_focus (false);
|
temporal_zoom_step_mouse_focus (false);
|
||||||
|
} else if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::PrimaryModifier)) {
|
||||||
|
temporal_zoom_step_mouse_focus (false);
|
||||||
} else {
|
} else {
|
||||||
temporal_zoom_step (false);
|
temporal_zoom_step (false);
|
||||||
}
|
}
|
||||||
@ -1068,11 +1069,12 @@ Editor::canvas_ruler_event (GdkEvent *event, ArdourCanvas::Item* item, ItemType
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_SCROLL_DOWN:
|
case GDK_SCROLL_DOWN:
|
||||||
if (Keyboard::modifier_state_equals(event->scroll.state,
|
if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::ScrollHorizontalModifier)) {
|
||||||
Keyboard::ScrollHorizontalModifier)) {
|
|
||||||
scroll_right_step ();
|
scroll_right_step ();
|
||||||
} else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) {
|
} else if (UIConfiguration::instance().get_use_mouse_position_as_zoom_focus_on_scroll()) {
|
||||||
temporal_zoom_step_mouse_focus (true);
|
temporal_zoom_step_mouse_focus (true);
|
||||||
|
} else if (Keyboard::modifier_state_equals (event->scroll.state, Keyboard::PrimaryModifier)) {
|
||||||
|
temporal_zoom_step_mouse_focus (true);
|
||||||
} else {
|
} else {
|
||||||
temporal_zoom_step (true);
|
temporal_zoom_step (true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user