From e2f33cdc8bca71f11036ba22acb17551d6deb5a7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 14 Apr 2017 17:32:16 +0100 Subject: [PATCH] correctly create Tracks, not Busses --- libs/ardour/session_state.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 5ba64ff2f7..8e1f86dde8 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -1745,10 +1745,10 @@ Session::XMLRouteFactory (const XMLNode& node, int version) return ret; } - XMLNode* pl_child = find_named_node (node, X_("audio-playlist")); + XMLProperty const * pl_prop = node.property (X_("audio-playlist")); - if (!pl_child) { - pl_child = find_named_node (node, X_("midi-playlist")); + if (!pl_prop) { + pl_prop = node.property (X_("midi-playlist")); } DataType type = DataType::AUDIO; @@ -1756,7 +1756,9 @@ Session::XMLRouteFactory (const XMLNode& node, int version) assert (type != DataType::NIL); - if (pl_child) { + if (pl_prop) { + + /* has at least 1 playlist, therefore a track ... */ boost::shared_ptr track; @@ -1839,6 +1841,7 @@ Session::XMLRouteFactory_2X (const XMLNode& node, int version) } else { PresentationInfo::Flag flags = PresentationInfo::get_flags (node); + cerr << "Creating a new bus\n"; boost::shared_ptr r (new Route (*this, X_("toBeResetFroXML"), flags)); if (r->init () == 0 && r->set_state (node, version) == 0) {