mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
mark loop button insensitive when there's no loop-range
This commit is contained in:
parent
487ae58301
commit
0092442a64
4 changed files with 12 additions and 3 deletions
|
|
@ -657,6 +657,7 @@ private:
|
|||
void edit_metadata ();
|
||||
void import_metadata ();
|
||||
|
||||
void set_loop_sensitivity ();
|
||||
void set_transport_sensitivity (bool);
|
||||
|
||||
//stuff for ProTools-style numpad
|
||||
|
|
|
|||
|
|
@ -848,7 +848,15 @@ ARDOUR_UI::error_blink (bool onoff)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ARDOUR_UI::set_loop_sensitivity ()
|
||||
{
|
||||
if (!_session || _session->config.get_external_sync()) {
|
||||
auto_loop_button.set_sensitive (false);
|
||||
} else {
|
||||
auto_loop_button.set_sensitive (_session && _session->locations()->auto_loop_location());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::set_transport_sensitivity (bool yn)
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ ARDOUR_UI::set_session (Session *s)
|
|||
_session->locations()->added.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context());
|
||||
_session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context());
|
||||
_session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ());
|
||||
_session->auto_loop_location_changed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::set_loop_sensitivity, this), gui_context ());
|
||||
|
||||
/* Clocks are on by default after we are connected to a session, so show that here.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -353,7 +353,6 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
|
||||
if (!_session->config.get_external_sync()) {
|
||||
sync_button.set_text (S_("SyncSource|Int."));
|
||||
auto_loop_button.set_sensitive (true);
|
||||
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
|
||||
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (true);
|
||||
ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (true);
|
||||
|
|
@ -365,12 +364,12 @@ ARDOUR_UI::parameter_changed (std::string p)
|
|||
// but makes it clear to the user that it's disabled.
|
||||
_session->request_play_loop (false, false);
|
||||
}
|
||||
auto_loop_button.set_sensitive (false);
|
||||
/* XXX we need to make sure that auto-play is off as well as insensitive */
|
||||
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (false);
|
||||
ActionManager::get_action ("Transport", "ToggleAutoReturn")->set_sensitive (false);
|
||||
ActionManager::get_action ("Transport", "ToggleFollowEdits")->set_sensitive (false);
|
||||
}
|
||||
set_loop_sensitivity ();
|
||||
|
||||
} else if (p == "follow-edits") {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue