X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftrack_selection.h;h=8c7aac45c4776b1c01bf5ba1167dacab8e082f55;hb=e5a181c323243a03338f5a9934a5df254986370d;hp=5f85bcfd5866e73323abe38df7b104aeb3edfa9e;hpb=8f45604f277f07cbde4c73a6fe3aeb802df19eab;p=ardour.git diff --git a/gtk2_ardour/track_selection.h b/gtk2_ardour/track_selection.h index 5f85bcfd58..8c7aac45c4 100644 --- a/gtk2_ardour/track_selection.h +++ b/gtk2_ardour/track_selection.h @@ -34,8 +34,6 @@ public: TrackSelection (PublicEditor const *, TrackViewList const &); virtual ~TrackSelection (); - - TrackViewList add (TrackViewList const &); template void foreach_time_axis (Function f) { @@ -46,44 +44,57 @@ public: template void foreach_route_ui (Function f) { - for (iterator i = begin(); i != end(); ++i) { + for (iterator i = begin(); i != end(); ) { + iterator tmp = i; + ++tmp; + RouteUI* t = dynamic_cast (*i); if (t) { f (t); } + i = tmp; } } template void foreach_route_time_axis (Function f) { - for (iterator i = begin(); i != end(); ++i) { + for (iterator i = begin(); i != end(); ) { + iterator tmp = i; + ++tmp; RouteTimeAxisView* t = dynamic_cast (*i); if (t) { f (t); } + i = tmp; } } template void foreach_audio_time_axis (Function f) { - for (iterator i = begin(); i != end(); ++i) { + for (iterator i = begin(); i != end(); ) { + iterator tmp = i; + ++tmp; AudioTimeAxisView* t = dynamic_cast (*i); if (t) { f (t); } + i = tmp; } } template void foreach_midi_time_axis (Function f) { - for (iterator i = begin(); i != end(); ++i) { + for (iterator i = begin(); i != end(); ) { + iterator tmp = i; + ++tmp; MidiTimeAxisView* t = dynamic_cast (*i); if (t) { f (t); } + i = tmp; } } - + private: PublicEditor const * _editor; };