insufficient attempt to drop references to a shadow MIDI port
[ardour.git] / gtk2_ardour / midi_selection.h
index 2aa04356d710bfd375f6201f7fe18769f224b04d..6ee26e4487c549cf118a669019fe9b9b7122674d 100644 (file)
@@ -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__ */