use new CoreSelection methods in editor and mixer
[ardour.git] / gtk2_ardour / mixer_ui.cc
index 6f11e59900beeead23a65ccb3f4760125cc6db51..b9b9eccacab8b0c1d5a22fe2b0f5b6d230023efc 100644 (file)
@@ -656,60 +656,18 @@ Mixer_UI::select_none ()
        deselect_all_strip_processors();
 }
 
- void
+void
 Mixer_UI::select_next_strip ()
 {
        deselect_all_strip_processors();
-       strips.sort (MixerStripSorter());
-
-       if (_selection.empty()) {
-               _selection.set (strips.front());
-               return;
-       }
-
-       bool select_me = false;
-
-       for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
-
-               if (select_me) {
-                       _selection.set (*i);
-                       return;
-               }
-
-               if ((*i)->selected()) {
-                       select_me = true;
-               }
-       }
-
-       _selection.set (strips.front());
+       _session->selection().select_next_stripable (true, false);
 }
 
 void
 Mixer_UI::select_prev_strip ()
 {
        deselect_all_strip_processors();
-       strips.sort (MixerStripSorter());
-
-       if (_selection.empty()) {
-               _selection.set (strips.back());
-               return;
-       }
-
-       bool select_me = false;
-
-       for (list<MixerStrip*>::reverse_iterator i = strips.rbegin(); i != strips.rend(); ++i) {
-
-               if (select_me) {
-                       _selection.set (*i);
-                       return;
-               }
-
-               if ((*i)->selected()) {
-                       select_me = true;
-               }
-       }
-
-       _selection.set (strips.back());
+       _session->selection().select_prev_stripable (true, false);
 }
 
 void