summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 434410b39e..014200da1c 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -991,7 +991,7 @@ Session::state(bool full_state)
if (full_state) {
Glib::Mutex::Lock rl (region_lock);
-
+#if 0
for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) {
/* only store regions not attached to playlists */
@@ -1000,6 +1000,17 @@ Session::state(bool full_state)
child->add_child_nocopy (i->second->state (true));
}
}
+#else
+ const RegionFactory::RegionMap& region_map (RegionFactory::all_regions());
+ for (RegionFactory::RegionMap::const_iterator i = region_map.begin(); i != region_map.end(); ++i) {
+ boost::shared_ptr<Region> r = i->second;
+ /* only store regions not attached to playlists */
+ if (r->playlist() == 0) {
+ child->add_child_nocopy (r->state (true));
+ }
+ }
+#endif
+
}
child = node->add_child ("DiskStreams");