when selecting a due to note selection, do not keep changing the selection
the code was first clearing the entire Editor selection before adding the region, causing every note selection to trigger the RegionsChanged pathway. This is crazy expensive for some reason (more than 8.12) and that should be investigated, but the logic is also wrong. Selecting a region that is alrready the sole selected region should not cause any action at all.
This commit is contained in:
@@ -2726,12 +2726,6 @@ MidiView::add_to_selection (NoteBase* ev)
|
||||
|
||||
if (_selection.empty()) {
|
||||
|
||||
/* we're about to select a note/some notes. Obey rule that only
|
||||
* 1 thing can be selected by clearing any current selection
|
||||
*/
|
||||
|
||||
_editing_context.get_selection().clear ();
|
||||
|
||||
/* first note selected in this region, force Editor region
|
||||
* selection to this region.
|
||||
*
|
||||
|
||||
@@ -723,8 +723,10 @@ Selection::set (RegionView* r, bool /*also_clear_tracks*/)
|
||||
clear_time(); // enforce region/object exclusivity
|
||||
clear_tracks(); // enforce object/track exclusivity
|
||||
}
|
||||
clear_objects ();
|
||||
add (r);
|
||||
if (!regions.contains (r) || regions.size() != 1) {
|
||||
clear_objects ();
|
||||
add (r);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user