diff options
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__ */ |