diff options
author | David Robillard <d@drobilla.net> | 2014-11-16 22:35:37 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-16 22:35:45 -0500 |
commit | 563f5c11a61ebae6a988fc703f3d465f3d7cd25a (patch) | |
tree | 1954fa25024c7bd100b04d5db354535a1b536a6d /gtk2_ardour/midi_selection.h | |
parent | 2fa6caad95d81f058326d931532f687a157361be (diff) |
Support cut/copy/paste of MIDI notes and controllers at the same time.
Diffstat (limited to 'gtk2_ardour/midi_selection.h')
-rw-r--r-- | gtk2_ardour/midi_selection.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_selection.h b/gtk2_ardour/midi_selection.h index 2aa04356d7..6ee26e4487 100644 --- a/gtk2_ardour/midi_selection.h +++ b/gtk2_ardour/midi_selection.h @@ -35,6 +35,18 @@ public: MidiRegionSelection& operator= (const MidiRegionSelection&); }; -struct MidiNoteSelection : std::list<MidiCutBuffer*> {}; +struct MidiNoteSelection : std::list<MidiCutBuffer*> { +public: + const_iterator + get_nth(size_t nth) const { + size_t count = 0; + for (const_iterator m = begin(); m != end(); ++m) { + if (count++ == nth) { + return m; + } + } + return end(); + } +}; #endif /* __ardour_gtk_midi_selection_h__ */ |