remove/delete current mixer strip when session is deleted
[ardour.git] / gtk2_ardour / audio_time_axis.cc
index a5b5c3e3a9557fdd4d87f8647d8dcc43e98dc7dd..270cc71a9628e5196508b0cc5222d0ca53164591 100644 (file)
@@ -160,21 +160,30 @@ AudioTimeAxisView::hide ()
        TimeAxisView::hide ();
 }
 
-void
+int
 AudioTimeAxisView::set_state (const XMLNode& node)
 {
        const XMLProperty *prop;
-       
-       TimeAxisView::set_state (node);
-       
-       if ((prop = node.property ("shown_editor")) != 0) {
-               if (prop->value() == "no") {
-                       _marked_for_display = false;
+       int ret;
+
+       if ((ret = TimeAxisView::set_state (node)) != 0) {
+               return ret;
+       }
+
+       /* if the TimeAxisView had marked this not for display,
+          then do not allow this to override it.
+       */
+
+       if ((prop = node.property ("marked_for_display")) == 0) {
+               if ((prop = node.property ("shown_editor")) != 0) {
+                       if (prop->value() == "no") {
+                               _marked_for_display = false;
+                       } else {
+                               _marked_for_display = true;
+                       }
                } else {
                        _marked_for_display = true;
                }
-       } else {
-               _marked_for_display = true;
        }
        
        XMLNodeList nlist = node.children();
@@ -210,6 +219,8 @@ AudioTimeAxisView::set_state (const XMLNode& node)
                        continue;
                }
        }
+
+       return 0;
 }
 
 void
@@ -478,6 +489,7 @@ AudioTimeAxisView::toggle_gain_track ()
                if (showit) {
                        gain_track->set_marked_for_display (true);
                        gain_track->canvas_display->show();
+                       gain_track->canvas_background->show();
                        gain_track->get_state_node()->add_property ("shown", X_("yes"));
                } else {
                        gain_track->set_marked_for_display (false);
@@ -514,6 +526,7 @@ AudioTimeAxisView::toggle_pan_track ()
                if (showit) {
                        pan_track->set_marked_for_display (true);
                        pan_track->canvas_display->show();
+                       pan_track->canvas_background->show();
                        pan_track->get_state_node()->add_property ("shown", X_("yes"));
                } else {
                        pan_track->set_marked_for_display (false);