summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas_events.cc
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2006-04-10 02:14:05 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2006-04-10 02:14:05 +0000
commit7e8a98224578e03e17fbf5e656241ff5ef1a0bc1 (patch)
tree33ceaf82af27e800a3b81b2c367522f2252a9fb4 /gtk2_ardour/editor_canvas_events.cc
parente9f9ca5278c6bcafd6a22ad273185c31664c32a5 (diff)
Reinstate mouse scroll actions (audio clocks, shuttle wheel, faders), clearing selection is undoable, fix compiler warning, add modified patch by Jon Michael Smith for mouse wheel track height adjustment and vertical canvas scrolling (thanks Jon)
git-svn-id: svn://localhost/trunk/ardour2@449 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas_events.cc')
-rw-r--r--gtk2_ardour/editor_canvas_events.cc28
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;