diff options
author | Carl Hetherington <carl@carlh.net> | 2011-05-13 17:25:02 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-05-13 17:25:02 +0000 |
commit | d0bb7df866faa48bb4aac7f947a72501e3dd61c3 (patch) | |
tree | 7ab3efb5485207fe90e3829e2ce45c45319d022e | |
parent | ac23288b5d842048a9c015027e179acbf1646af4 (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
-rw-r--r-- | gtk2_ardour/shuttle_control.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/shuttle_control.h | 1 |
2 files changed, 4 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); } diff --git a/gtk2_ardour/shuttle_control.h b/gtk2_ardour/shuttle_control.h index 7f8176ea01..836ac535ed 100644 --- a/gtk2_ardour/shuttle_control.h +++ b/gtk2_ardour/shuttle_control.h @@ -60,6 +60,7 @@ class ShuttleControl : public Gtk::DrawingArea, public ARDOUR::SessionHandlePtr float shuttle_max_speed; float last_speed_displayed; bool shuttle_grabbed; + double shuttle_speed_on_grab; float shuttle_fract; boost::shared_ptr<ShuttleControllable> _controllable; cairo_pattern_t* pattern; |