Fix restore of track visibility from state files (#3245)
[ardour.git] / gtk2_ardour / time_axis_view.cc
index e5d4092789fcadf23187367311f7df8c1c5a89fa..978ce6debba905a3eb99df60f7f7f7f4bebbcd9a 100644 (file)
@@ -32,7 +32,6 @@
 
 #include <gtkmm2ext/utils.h>
 #include <gtkmm2ext/selector.h>
-#include <gtkmm2ext/stop_signal.h>
 
 #include "ardour/session.h"
 #include "ardour/utils.h"
@@ -969,6 +968,8 @@ TimeAxisView::get_parent_with_state ()
 XMLNode&
 TimeAxisView::get_state ()
 {
+       /* XXX: is this method used? */
+       
        XMLNode* node = new XMLNode ("TAV-" + name());
        char buf[32];
 
@@ -983,10 +984,15 @@ TimeAxisView::set_state (const XMLNode& node, int /*version*/)
 {
        const XMLProperty *prop;
 
+       /* XXX: I think this might be vestigial */
        if ((prop = node.property ("marked-for-display")) != 0) {
                _marked_for_display = (prop->value() == "1");
        }
 
+       if ((prop = node.property ("shown-editor")) != 0) {
+               _marked_for_display = string_is_affirmative (prop->value ());
+       }
+
        if ((prop = node.property ("track-height")) != 0) {
 
                if (prop->value() == "largest") {