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:
parent
c9c419213f
commit
4b6e372ce7
@ -2548,13 +2548,13 @@ MidiRegionView::update_drag_selection(timepos_t const & start, timepos_t const &
|
|||||||
|
|
||||||
/* Add control points to selection. */
|
/* Add control points to selection. */
|
||||||
const ATracks& atracks = midi_view()->automation_tracks();
|
const ATracks& atracks = midi_view()->automation_tracks();
|
||||||
Selectables selectables;
|
|
||||||
editor.get_selection().clear_points();
|
editor.get_selection().clear_points();
|
||||||
|
|
||||||
timepos_t st (start);
|
timepos_t st (start);
|
||||||
timepos_t et (end);
|
timepos_t et (end);
|
||||||
|
|
||||||
for (ATracks::const_iterator a = atracks.begin(); a != atracks.end(); ++a) {
|
for (ATracks::const_iterator a = atracks.begin(); a != atracks.end(); ++a) {
|
||||||
|
Selectables selectables;
|
||||||
a->second->get_selectables (st, et, gy0, gy1, selectables);
|
a->second->get_selectables (st, et, gy0, gy1, selectables);
|
||||||
for (Selectables::const_iterator s = selectables.begin(); s != selectables.end(); ++s) {
|
for (Selectables::const_iterator s = selectables.begin(); s != selectables.end(); ++s) {
|
||||||
ControlPoint* cp = dynamic_cast<ControlPoint*>(*s);
|
ControlPoint* cp = dynamic_cast<ControlPoint*>(*s);
|
||||||
|
Loading…
Reference in New Issue
Block a user