no longer delete and recreate MonitorSection when it is removed/added to a Session
[ardour.git] / gtk2_ardour / mixer_ui.cc
index a4cfe775f93e58b76b6f55af121e02c38fc2a6e4..37286e8e586660011270d877453df5ba72672870 100644 (file)
@@ -570,7 +570,7 @@ Mixer_UI::add_stripables (StripableList& slist)
                                                if (mnode) {
                                                        _monitor_section->tearoff().set_state (*mnode);
                                                }
-                                               
+
                                                set_monitor_action_sensitivity(true);
                                        }
 
@@ -2660,9 +2660,9 @@ void
 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"));
@@ -2684,8 +2684,6 @@ Mixer_UI::monitor_section_going_away ()
                monitor_section_detached ();
                out_packer.remove (_monitor_section->tearoff());
                _monitor_section->set_session (0);
-               delete _monitor_section;
-               _monitor_section = 0;
        }
 }