From 6b06923a5d53b9d535709fe0b11340ceb365b5f0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 9 Jul 2012 19:51:09 +0000 Subject: [PATCH] shift-click on shuttle controller in wheel mode resets it to 1.0 (100%) (#4994) git-svn-id: svn://localhost/ardour2/branches/3.0@13000 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/shuttle_control.cc | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc index 88159fe020..3f18c26feb 100644 --- a/gtk2_ardour/shuttle_control.cc +++ b/gtk2_ardour/shuttle_control.cc @@ -241,10 +241,16 @@ ShuttleControl::on_button_press_event (GdkEventButton* ev) switch (ev->button) { case 1: - add_modal_grab (); - shuttle_grabbed = true; - shuttle_speed_on_grab = _session->transport_speed (); - mouse_shuttle (ev->x, true); + if (Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)) { + if (_session->transport_rolling()) { + _session->request_transport_speed (1.0); + } + } else { + add_modal_grab (); + shuttle_grabbed = true; + shuttle_speed_on_grab = _session->transport_speed (); + mouse_shuttle (ev->x, true); + } break; case 2: @@ -265,15 +271,16 @@ ShuttleControl::on_button_release_event (GdkEventButton* ev) switch (ev->button) { case 1: - shuttle_grabbed = false; - remove_modal_grab (); - - if (Config->get_shuttle_behaviour() == Sprung) { - _session->request_transport_speed (shuttle_speed_on_grab); - } else { - mouse_shuttle (ev->x, true); + if (shuttle_grabbed) { + shuttle_grabbed = false; + remove_modal_grab (); + + if (Config->get_shuttle_behaviour() == Sprung) { + _session->request_transport_speed (shuttle_speed_on_grab); + } else { + mouse_shuttle (ev->x, true); + } } - return true; case 2: