X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fautomation_selection.h;h=204f4f19becd9188ed902289c8a9ca8babebd498;hb=80fa696564a2b261b6cf751ff61e4d885d3a2dc0;hp=05063e144e7b736fe9385d074f79660ce24c594b;hpb=87726495c30f90554b5204b5385d17274a8fe93e;p=ardour.git diff --git a/gtk2_ardour/automation_selection.h b/gtk2_ardour/automation_selection.h index 05063e144e..204f4f19be 100644 --- a/gtk2_ardour/automation_selection.h +++ b/gtk2_ardour/automation_selection.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 Paul Davis + Copyright (C) 2000-2007 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,10 +22,23 @@ #include -namespace ARDOUR { - class AutomationList; -} - -struct AutomationSelection : list {}; +#include "ardour/automation_list.h" +#include "evoral/Parameter.hpp" + +class AutomationSelection : public std::list > { +public: + const_iterator + get_nth(const Evoral::Parameter& param, size_t nth) const { + size_t count = 0; + for (const_iterator l = begin(); l != end(); ++l) { + if ((*l)->parameter() == param) { + if (count++ == nth) { + return l; + } + } + } + return end(); + } +}; #endif /* __ardour_gtk_automation_selection_h__ */