13
0

Fix deleting the same point multiple times (#9689)

When iterating over automation tracks, previously it was
possible that the same point was added multiple times to
the selection.
This commit is contained in:
Robin Gareus 2024-04-15 00:30:30 +02:00
parent c9c419213f
commit 4b6e372ce7
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2548,13 +2548,13 @@ MidiRegionView::update_drag_selection(timepos_t const & start, timepos_t const &
/* Add control points to selection. */
const ATracks& atracks = midi_view()->automation_tracks();
Selectables selectables;
editor.get_selection().clear_points();
timepos_t st (start);
timepos_t et (end);
for (ATracks::const_iterator a = atracks.begin(); a != atracks.end(); ++a) {
Selectables selectables;
a->second->get_selectables (st, et, gy0, gy1, selectables);
for (Selectables::const_iterator s = selectables.begin(); s != selectables.end(); ++s) {
ControlPoint* cp = dynamic_cast<ControlPoint*>(*s);