Preformance - reinstate EditorRegions::freeze_tree_model ().

This commit is contained in:
nick_m 2016-04-09 03:21:13 +10:00
parent ec29f5d64c
commit 618a391346
4 changed files with 36 additions and 0 deletions

View file

@ -153,6 +153,8 @@ Editor::redo (uint32_t n)
void
Editor::split_regions_at (framepos_t where, RegionSelection& regions)
{
bool frozen = false;
RegionSelection pre_selected_regions = selection->regions;
bool working_on_selection = !pre_selected_regions.empty();
@ -180,6 +182,8 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
} else {
snap_to (where);
frozen = true;
EditorFreeze(); /* Emit Signal */
}
for (RegionSelection::iterator a = regions.begin(); a != regions.end(); ) {
@ -247,6 +251,10 @@ Editor::split_regions_at (framepos_t where, RegionSelection& regions)
(*c).disconnect ();
}
if (frozen){
EditorThaw(); /* Emit Signal */
}
if (working_on_selection) {
// IFF we were working on selected regions, try to reinstate the other region selections that existed before the freeze/thaw.