summaryrefslogtreecommitdiff
path: root/gtk2_ardour/shuttle_control.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/shuttle_control.cc')
-rw-r--r--gtk2_ardour/shuttle_control.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/shuttle_control.cc b/gtk2_ardour/shuttle_control.cc
index 38bbfad73a..caf0d8cf73 100644
--- a/gtk2_ardour/shuttle_control.cc
+++ b/gtk2_ardour/shuttle_control.cc
@@ -77,7 +77,7 @@ ShuttleControl::ShuttleControl ()
shuttle_grabbed = false;
shuttle_speed_on_grab = 0;
shuttle_fract = 0.0;
- shuttle_max_speed = 8.0f;
+ shuttle_max_speed = Config->get_max_transport_speed();
shuttle_context_menu = 0;
_hovering = false;
@@ -89,7 +89,7 @@ ShuttleControl::ShuttleControl ()
shuttle_max_speed = Config->get_shuttle_max_speed();
- if (shuttle_max_speed >= 8.f) { shuttle_max_speed = 8.0f; }
+ if (shuttle_max_speed >= Config->get_max_transport_speed()) { shuttle_max_speed = Config->get_max_transport_speed(); }
else if (shuttle_max_speed >= 6.f) { shuttle_max_speed = 6.0f; }
else if (shuttle_max_speed >= 4.f) { shuttle_max_speed = 4.0f; }
else if (shuttle_max_speed >= 3.f) { shuttle_max_speed = 3.0f; }
@@ -225,6 +225,8 @@ ShuttleControl::build_shuttle_context_menu ()
RadioMenuItem::Group speed_group;
+ /* XXX this code assumes that Config->get_max_transport_speed() returns 8 */
+
speed_items.push_back (RadioMenuElem (speed_group, "8", sigc::bind (sigc::mem_fun (*this, &ShuttleControl::set_shuttle_max_speed), 8.0f)));
if (shuttle_max_speed == 8.0) {
static_cast<RadioMenuItem*>(&speed_items.back())->set_active ();