summaryrefslogtreecommitdiff
path: root/gtk2_ardour/shuttle_control.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-05-13 17:25:02 +0000
committerCarl Hetherington <carl@carlh.net>2011-05-13 17:25:02 +0000
commitd0bb7df866faa48bb4aac7f947a72501e3dd61c3 (patch)
tree7ab3efb5485207fe90e3829e2ce45c45319d022e /gtk2_ardour/shuttle_control.cc
parentac23288b5d842048a9c015027e179acbf1646af4 (diff)
Return shuttle speed to previous value on release after sprung grab (#4039).
git-svn-id: svn://localhost/ardour2/branches/3.0@9506 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/shuttle_control.cc')
-rw-r--r--gtk2_ardour/shuttle_control.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc
index 1274dce6f8..5193e4cb6e 100644
--- a/gtk2_ardour/shuttle_control.cc
+++ b/gtk2_ardour/shuttle_control.cc
@@ -54,6 +54,7 @@ ShuttleControl::ShuttleControl ()
last_shuttle_request = 0;
last_speed_displayed = -99999999;
shuttle_grabbed = false;
+ shuttle_speed_on_grab = 0;
shuttle_fract = 0.0;
shuttle_max_speed = 8.0f;
shuttle_style_menu = 0;
@@ -236,6 +237,7 @@ ShuttleControl::on_button_press_event (GdkEventButton* ev)
case 1:
add_modal_grab ();
shuttle_grabbed = true;
+ shuttle_speed_on_grab = _session->transport_speed ();
mouse_shuttle (ev->x, true);
break;
@@ -261,11 +263,7 @@ ShuttleControl::on_button_release_event (GdkEventButton* ev)
remove_modal_grab ();
if (Config->get_shuttle_behaviour() == Sprung) {
- if (_session->config.get_auto_play()) {
- _session->request_transport_speed (1.0);
- } else {
- _session->request_transport_speed (0.0);
- }
+ _session->request_transport_speed (shuttle_speed_on_grab);
} else {
mouse_shuttle (ev->x, true);
}