summaryrefslogtreecommitdiff
path: root/gtk2_ardour/shuttle_control.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-09 19:51:09 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-09 19:51:09 +0000
commit6b06923a5d53b9d535709fe0b11340ceb365b5f0 (patch)
tree3a387168e50eb063af23f5888eaa6c83cc13ca6b /gtk2_ardour/shuttle_control.cc
parentdeb202b1f7cf73b195c02ddda36e6a73af02dc0a (diff)
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
Diffstat (limited to 'gtk2_ardour/shuttle_control.cc')
-rw-r--r--gtk2_ardour/shuttle_control.cc31
1 files 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: