diff options
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 6d6a07da95..38c7e387f8 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -1373,10 +1373,21 @@ Playlist::set_state (const XMLNode& node) if (child->name() == "Region") { - if ((region = RegionFactory::create (_session, *child, true)) == 0) { - error << _("Playlist: cannot create region from state file") << endmsg; +#if 0 + if ((prop = child->property ("id")) == 0) { + error << _("region state node has no ID, ignored") << endmsg; continue; } + + ID id = prop->value (); + + if ((region = region_by_id (id)) == 0) { +#endif + if ((region = RegionFactory::create (_session, *child, true)) == 0) { + error << _("Playlist: cannot create region from state file") << endmsg; + continue; + } +// } add_region (region, region->position(), 1.0, false); |