diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/session_playlists.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/ardour/session_playlists.cc b/libs/ardour/session_playlists.cc index ac3baf2008..b2c4640880 100644 --- a/libs/ardour/session_playlists.cc +++ b/libs/ardour/session_playlists.cc @@ -252,7 +252,9 @@ SessionPlaylists::find_equivalent_playlist_regions (boost::shared_ptr<Region> re (*i)->get_region_list_equivalent_regions (region, result); } -/** Return the number of playlists (not regions) that contain @a src */ +/** Return the number of playlists (not regions) that contain @a src + * Important: this counts usage in both used and not-used playlists. + */ uint32_t SessionPlaylists::source_use_count (boost::shared_ptr<const Source> src) const { @@ -264,6 +266,14 @@ SessionPlaylists::source_use_count (boost::shared_ptr<const Source> src) const break; } } + + for (List::const_iterator p = unused_playlists.begin(); p != unused_playlists.end(); ++p) { + if ((*p)->uses_source (src)) { + ++count; + break; + } + } + return count; } |