mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
Notify owners when removing regions during cleanup
Previously the region was only removed from the Session's region_map without sending notifications.
This commit is contained in:
parent
8e1a2d7caa
commit
fc91c217d1
1 changed files with 9 additions and 11 deletions
|
|
@ -663,19 +663,17 @@ void
|
|||
RegionFactory::remove_regions_using_source (boost::shared_ptr<Source> src)
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (region_map_lock);
|
||||
|
||||
RegionMap::iterator i = region_map.begin();
|
||||
while (i != region_map.end()) {
|
||||
|
||||
RegionMap::iterator j = i;
|
||||
++j;
|
||||
|
||||
RegionList remove_regions;
|
||||
for (RegionMap::const_iterator i = region_map.begin(); i != region_map.end(); ++i) {
|
||||
if (i->second->uses_source (src)) {
|
||||
remove_from_region_name_map (i->second->name ());
|
||||
region_map.erase (i);
|
||||
}
|
||||
remove_regions.push_back (i->second);
|
||||
}
|
||||
}
|
||||
lm.release ();
|
||||
|
||||
i = j;
|
||||
/* this will call RegionFactory::map_remove () */
|
||||
for (RegionList::iterator i = remove_regions.begin(); i != remove_regions.end(); ++i) {
|
||||
(*i)->drop_references ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue