fix bugs (thinkos?) that confused PlaylistSource's id() with its original()
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 9 Jan 2020 02:37:55 +0000 (19:37 -0700)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 9 Jan 2020 05:21:21 +0000 (22:21 -0700)
libs/ardour/playlist_source.cc

index 5b22465b38ad342d24f063ba627fb7ff20028196..dc03bbeb2d7d20944aa31dec900efaf3b676dfc5 100644 (file)
@@ -82,7 +82,7 @@ PlaylistSource::add_state (XMLNode& node)
        node.set_property ("playlist", _playlist->id ());
        node.set_property ("offset", _playlist_offset);
        node.set_property ("length", _playlist_length);
-       node.set_property ("original", id());
+       node.set_property ("original", _original);
 
        node.add_child_nocopy (_playlist->get_state());
 }
@@ -135,17 +135,10 @@ PlaylistSource::set_state (const XMLNode& node, int /*version*/)
                throw failed_constructor ();
        }
 
-       /* XXX not quite sure why we set our ID back to the "original" one
-          here. october 2011, paul
-       */
-
-       std::string str;
-       if (!node.get_property (X_("original"), str)) {
+       if (!node.get_property (X_("original"), _original)) {
                throw failed_constructor ();
        }
 
-       set_id (str);
-
        _level = _playlist->max_source_level () + 1;
 
        return 0;