Fix session sensitivity of some toolbar controls
This commit is contained in:
parent
cc9f941488
commit
561cf86919
@ -2000,6 +2000,9 @@ ARDOUR_UI::map_transport_state ()
|
||||
{
|
||||
if (!_session) {
|
||||
layered_button.set_sensitive (false);
|
||||
if (UIConfiguration::instance().get_screen_saver_mode () == InhibitWhileRecording) {
|
||||
inhibit_screensaver (false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -405,6 +405,9 @@ ARDOUR_UI::setup_windows ()
|
||||
bool
|
||||
ARDOUR_UI::bind_lua_action_script (GdkEventButton*ev, int i)
|
||||
{
|
||||
if (!_session) {
|
||||
return false;
|
||||
}
|
||||
LuaInstance *li = LuaInstance::instance();
|
||||
std::string name;
|
||||
if (ev->button != 3 && !(ev->button == 1 && !li->lua_action_name (i, name))) {
|
||||
|
@ -108,6 +108,8 @@ ARDOUR_UI::set_session (Session *s)
|
||||
virtual_keyboard_window->set_session (s);
|
||||
}
|
||||
|
||||
map_transport_state ();
|
||||
|
||||
if (!_session) {
|
||||
WM::Manager::instance().set_session (s);
|
||||
/* Session option editor cannot exist across change-of-session */
|
||||
|
@ -484,6 +484,7 @@ ARDOUR_UI::install_actions ()
|
||||
ActionManager::transport_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_toggle_action (main_actions, X_("ToggleLatencyCompensation"), _("Disable Latency Compensation"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_latency_switch));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
act = ActionManager::register_action (main_actions, X_("MonitorMenu"), _("Monitor Section")); /* just the submenu item */
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
Loading…
Reference in New Issue
Block a user