if (mnode) {
_monitor_section->tearoff().set_state (*mnode);
}
-
+
set_monitor_action_sensitivity(true);
}
Mixer_UI::monitor_section_going_away ()
{
/* Set sensitivity based on existence of the monitor bus */
-
+
set_monitor_action_sensitivity(false);
-
+
if (_monitor_section) {
XMLNode* ui_node = Config->extra_xml(X_("UI"));
monitor_section_detached ();
out_packer.remove (_monitor_section->tearoff());
_monitor_section->set_session (0);
- delete _monitor_section;
- _monitor_section = 0;
}
}
using namespace PBD;
using namespace std;
-Glib::RefPtr<ActionGroup> MonitorSection::monitor_actions;
-Gtkmm2ext::Bindings* MonitorSection::bindings = 0;
-
#define PX_SCALE(px) std::max((float)px, rintf((float)px * UIConfiguration::instance().get_ui_scale()))
MonitorSection::MonitorSection (Session* s)
Glib::RefPtr<Action> act;
- if (!monitor_actions) {
- register_actions ();
- load_bindings ();
- }
+ load_bindings ();
+ register_actions ();
+ set_data ("ardour-bindings", bindings);
+ bindings->associate ();
channel_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
- set_data ("ardour-bindings", bindings);
-
_plugin_selector = new PluginSelector (PluginManager::instance());
insert_box = new ProcessorBox (_session, boost::bind (&MonitorSection::plugin_selector, this), _rr_selection, 0);
insert_box->set_no_show_all ();
populate_buttons ();
+ /* some actions may have been left in the wrong state from a
+ * previous monitor route that was then deleted
+ */
+ ActionManager::set_sensitive (monitor_actions, true);
+ ActionManager::set_sensitive (solo_actions, true);
+
} else {
/* no session */