Fix off-by-one in body_range().
[ardour.git] / libs / ardour / playlist.cc
index 3b0528ed3b7fc9f9975e8f6f8b0bcc3bebf462a0..8a19b1fcebdf1f60fba36f03564106c47141aed1 100644 (file)
@@ -2180,6 +2180,16 @@ Playlist::n_regions() const
        return regions.size();
 }
 
+/** @return true if the all_regions list is empty, ie this playlist
+ *  has never had a region added to it.
+ */
+bool
+Playlist::all_regions_empty() const
+{
+       RegionReadLock rl (const_cast<Playlist *> (this));
+       return all_regions.empty();
+}
+
 pair<framepos_t, framepos_t>
 Playlist::get_extent () const
 {