diff options
author | David Robillard <d@drobilla.net> | 2008-02-25 01:33:30 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-02-25 01:33:30 +0000 |
commit | ff5709e8955dc9f36467cee610d7d6641de1aabc (patch) | |
tree | b5b5f2c271d59c7e89108396048f1f68b4085429 /gtk2_ardour | |
parent | 318c2130626d3511a5c17c715b4115e910a33eac (diff) |
Fix selection issues.
git-svn-id: svn://localhost/ardour2/branches/3.0@3120 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 3edd527ad0..410d6a565e 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -820,7 +820,10 @@ MidiRegionView::note_dropped(CanvasMidiEvent* ev, double dt, uint8_t dnote) if (_selection.find(ev) != _selection.end()) { start_delta_command(); - for (Selection::iterator i = _selection.begin(); i != _selection.end(); ++i) { + for (Selection::iterator i = _selection.begin(); i != _selection.end() ; ) { + Selection::iterator next = i; + ++next; + command_remove_note(*i); const boost::shared_ptr<Note> copy(new Note(*(*i)->note().get())); @@ -828,6 +831,9 @@ MidiRegionView::note_dropped(CanvasMidiEvent* ev, double dt, uint8_t dnote) copy->set_note((*i)->note()->note() + dnote); command_add_note(copy); + + _selection.erase(i); + i = next; } apply_command(); } |