diff options
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas_events.cc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc index 824b547938..256920d32f 100644 --- a/gtk2_ardour/editor_canvas_events.cc +++ b/gtk2_ardour/editor_canvas_events.cc @@ -49,7 +49,7 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) { int x, y; double wx, wy; - + switch (ev->direction) { case GDK_SCROLL_UP: if (Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) { @@ -72,6 +72,16 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) jack_nframes_t where = event_frame (&event, 0, 0); temporal_zoom_to_frame (true, where); return true; + } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) { + if (!current_stepping_trackview) { + step_timeout = Glib::signal_timeout().connect (mem_fun(*this, &Editor::track_height_step_timeout), 500); + if (!(current_stepping_trackview = dynamic_cast<AudioTimeAxisView*> (trackview_by_y_position (ev->y)))) { + return false; + } + } + gettimeofday (&last_track_height_step_timestamp, 0); + current_stepping_trackview->step_height (true); + return true; } else { scroll_tracks_up_line (); return true; @@ -94,15 +104,15 @@ Editor::track_canvas_scroll (GdkEventScroll* ev) temporal_zoom_to_frame (false, where); return true; } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::Shift)) { - if (clicked_trackview) { - if (!current_stepping_trackview) { - step_timeout = Glib::signal_timeout().connect (mem_fun(*this, &Editor::track_height_step_timeout), 500); - current_stepping_trackview = clicked_trackview; - } - gettimeofday (&last_track_height_step_timestamp, 0); - current_stepping_trackview->step_height (true); + if (!current_stepping_trackview) { + step_timeout = Glib::signal_timeout().connect (mem_fun(*this, &Editor::track_height_step_timeout), 500); + if (!(current_stepping_trackview = dynamic_cast<AudioTimeAxisView*> (trackview_by_y_position (ev->y)))) { + return false; + } } - return true; + gettimeofday (&last_track_height_step_timestamp, 0); + current_stepping_trackview->step_height (false); + return true; } else { scroll_tracks_down_line (); return true; |