mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
fix bad re-ordering in ARDOUR_UI::set_session() that changed when transport-related actions are set sensitive (compared to v5)
This specific change has broader scope than the bare minimum required - we could just move/replicate transport_ctrl.set_session() after session_sensitive_actions have had their sensitivity set to true. But this "seems" like a more thorough solution, in that it sets all relevant actions groups before doing anythng else.
This commit is contained in:
parent
7e899b4199
commit
4148d2cee4
1 changed files with 13 additions and 11 deletions
|
|
@ -98,6 +98,19 @@ ARDOUR_UI::set_session (Session *s)
|
||||||
{
|
{
|
||||||
SessionHandlePtr::set_session (s);
|
SessionHandlePtr::set_session (s);
|
||||||
|
|
||||||
|
/* adjust sensitivity of menu bar options to reflect presence/absence
|
||||||
|
* of session
|
||||||
|
*/
|
||||||
|
|
||||||
|
ActionManager::set_sensitive (ActionManager::session_sensitive_actions, _session);
|
||||||
|
ActionManager::set_sensitive (ActionManager::write_sensitive_actions, _session ? _session->writable() : false);
|
||||||
|
|
||||||
|
if (_session && _session->locations()->num_range_markers()) {
|
||||||
|
ActionManager::set_sensitive (ActionManager::range_sensitive_actions, true);
|
||||||
|
} else {
|
||||||
|
ActionManager::set_sensitive (ActionManager::range_sensitive_actions, false);
|
||||||
|
}
|
||||||
|
|
||||||
transport_ctrl.set_session (s);
|
transport_ctrl.set_session (s);
|
||||||
|
|
||||||
if (big_transport_window) {
|
if (big_transport_window) {
|
||||||
|
|
@ -148,17 +161,6 @@ ARDOUR_UI::set_session (Session *s)
|
||||||
transport_masters_window->set_session (s);
|
transport_masters_window->set_session (s);
|
||||||
rc_option_editor->set_session (s);
|
rc_option_editor->set_session (s);
|
||||||
|
|
||||||
/* sensitize menu bar options that are now valid */
|
|
||||||
|
|
||||||
ActionManager::set_sensitive (ActionManager::session_sensitive_actions, true);
|
|
||||||
ActionManager::set_sensitive (ActionManager::write_sensitive_actions, _session->writable());
|
|
||||||
|
|
||||||
if (_session->locations()->num_range_markers()) {
|
|
||||||
ActionManager::set_sensitive (ActionManager::range_sensitive_actions, true);
|
|
||||||
} else {
|
|
||||||
ActionManager::set_sensitive (ActionManager::range_sensitive_actions, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* allow wastebasket flush again */
|
/* allow wastebasket flush again */
|
||||||
|
|
||||||
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Main"), X_("FlushWastebasket"));
|
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Main"), X_("FlushWastebasket"));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue