summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas_events.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-04-29 23:15:09 +0000
committerCarl Hetherington <carl@carlh.net>2010-04-29 23:15:09 +0000
commit73b67f16d446b12ddf029343feb00c04bcd2a1f1 (patch)
tree92d992f1cfccb6b2eeb4356990e4b4715e84933c /gtk2_ardour/editor_canvas_events.cc
parentd57a472c16c9bd170e579dded005d621ae22407f (diff)
Make primary-modifier+scroll wheel zoom respect zoom focus setting. Fixes #2515.
git-svn-id: svn://localhost/ardour2/branches/3.0@7023 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r--gtk2_ardour/editor_canvas_events.cc29
1 files changed, 2 insertions, 27 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index a670543512..f7fd030a01 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -77,22 +77,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
switch (direction) {
case GDK_SCROLL_UP:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
- //if (ev->state == GDK_CONTROL_MASK) {
- /* XXX
- the ev->x will be out of step with the canvas
- if we're in mid zoom, so we have to get the damn mouse
- pointer again
- */
- track_canvas->get_pointer (x, y);
- track_canvas->window_to_world (x, y, wx, wy);
-
- GdkEvent event;
- event.type = GDK_BUTTON_RELEASE;
- event.button.x = wx;
- event.button.y = wy;
-
- nframes64_t where = event_frame (&event, 0, 0);
- temporal_zoom_to_frame (false, where);
+ temporal_zoom_step (false);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
direction = GDK_SCROLL_LEFT;
@@ -117,17 +102,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev)
case GDK_SCROLL_DOWN:
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
- //if (ev->state == GDK_CONTROL_MASK) {
- track_canvas->get_pointer (x, y);
- track_canvas->window_to_world (x, y, wx, wy);
-
- GdkEvent event;
- event.type = GDK_BUTTON_RELEASE;
- event.button.x = wx;
- event.button.y = wy;
-
- nframes64_t where = event_frame (&event, 0, 0);
- temporal_zoom_to_frame (true, where);
+ temporal_zoom_step (true);
return true;
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
direction = GDK_SCROLL_RIGHT;