mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
fix for #5078 - not considering unused playlists when computing region use count
git-svn-id: svn://localhost/ardour2/branches/3.0@13452 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f73bfef770
commit
7253e8ff84
1 changed files with 11 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue