13
0

Fix session sensitivity of some toolbar controls

This commit is contained in:
Robin Gareus 2019-12-13 16:33:12 +01:00
parent cc9f941488
commit 561cf86919
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 9 additions and 0 deletions

View File

@ -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;
}

View File

@ -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))) {

View File

@ -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 */

View File

@ -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);