mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
Significantly speed up multiple region duplication
When multiple regions are duplicated Playlist::duplicate is called sequentially for each region. Previously that lead to a call to Playlist::flush_notifications after each step, which is rather expensive. Playlist::ContentsChanged and Playlist::LayeringChanged trigger SessionEvent::Overwrite and GUI updates.
This commit is contained in:
parent
e79d8b00f9
commit
cfca2d2af9
1 changed files with 3 additions and 0 deletions
|
|
@ -5343,6 +5343,7 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times)
|
|||
/* successfully inserted into set, so it's the first time we've seen this playlist */
|
||||
playlist->clear_changes ();
|
||||
playlist->clear_owned_changes ();
|
||||
playlist->freeze ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5383,6 +5384,7 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times)
|
|||
if (playlists.insert (playlist).second) {
|
||||
playlist->clear_changes ();
|
||||
playlist->clear_owned_changes ();
|
||||
playlist->freeze ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5394,6 +5396,7 @@ Editor::duplicate_some_regions (RegionSelection& regions, float times)
|
|||
}
|
||||
|
||||
for (PlaylistSet::iterator p = playlists.begin(); p != playlists.end(); ++p) {
|
||||
(*p)->thaw ();
|
||||
(*p)->rdiff_and_add_command (_session);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue