From 4b6e372ce7803b9af86ac37650e7fdbf36c830f2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 15 Apr 2024 00:30:30 +0200 Subject: [PATCH] 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. --- gtk2_ardour/midi_region_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 686fca73ff..90882f3296 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -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(*s);