Fix VCA Automation Lane selection
authorRobin Gareus <robin@gareus.org>
Fri, 7 Jul 2017 12:47:36 +0000 (14:47 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 7 Jul 2017 12:47:36 +0000 (14:47 +0200)
This moves child-selection API up into TAV (Superclass of StripableTAV
which actually owns the children)

gtk2_ardour/route_time_axis.cc
gtk2_ardour/time_axis_view.cc
gtk2_ardour/time_axis_view.h

index 045dffa20f426e3c830190a21a03e2be3c16737b..c1fa5e26ba6a7e2d1928c4e9105f9f2e6bc1fdf9 100644 (file)
@@ -1345,9 +1345,7 @@ RouteTimeAxisView::selection_click (GdkEventButton* ev)
 void
 RouteTimeAxisView::set_selected_points (PointSelection& points)
 {
-       for (Children::iterator i = children.begin(); i != children.end(); ++i) {
-               (*i)->set_selected_points (points);
-       }
+       StripableTimeAxisView::set_selected_points (points);
        AudioStreamView* asv = dynamic_cast<AudioStreamView*>(_view);
        if (asv) {
                asv->set_selected_points (points);
@@ -1382,12 +1380,7 @@ RouteTimeAxisView::get_selectables (framepos_t start, framepos_t end, double top
        }
 
        /* pick up visible automation tracks */
-
-       for (Children::iterator i = children.begin(); i != children.end(); ++i) {
-               if (!(*i)->hidden()) {
-                       (*i)->get_selectables (start_adjusted, end_adjusted, top, bot, results, within);
-               }
-       }
+       StripableTimeAxisView::get_selectables (start_adjusted, end_adjusted, top, bot, results, within);
 }
 
 void
@@ -1396,14 +1389,7 @@ RouteTimeAxisView::get_inverted_selectables (Selection& sel, list<Selectable*>&
        if (_view) {
                _view->get_inverted_selectables (sel, results);
        }
-
-       for (Children::iterator i = children.begin(); i != children.end(); ++i) {
-               if (!(*i)->hidden()) {
-                       (*i)->get_inverted_selectables (sel, results);
-               }
-       }
-
-       return;
+       StripableTimeAxisView::get_inverted_selectables (sel, results);
 }
 
 RouteGroup*
index c1ec7767e55c8cf4de6607f472666ced5f6a8015..05d93f696c79597ee87bf908aa0ab023c91e6a68 100644 (file)
@@ -1017,15 +1017,31 @@ TimeAxisView::remove_child (boost::shared_ptr<TimeAxisView> child)
  *  @param result Filled in with selectable things.
  */
 void
-TimeAxisView::get_selectables (framepos_t /*start*/, framepos_t /*end*/, double /*top*/, double /*bot*/, list<Selectable*>& /*result*/, bool /*within*/)
+TimeAxisView::get_selectables (framepos_t start, framepos_t end, double top, double bot, list<Selectable*>& results, bool within)
 {
-       return;
+       for (Children::iterator i = children.begin(); i != children.end(); ++i) {
+               if (!(*i)->hidden()) {
+                       (*i)->get_selectables (start, end, top, bot, results, within);
+               }
+       }
+}
+
+void
+TimeAxisView::set_selected_points (PointSelection& points)
+{
+       for (Children::iterator i = children.begin(); i != children.end(); ++i) {
+               (*i)->set_selected_points (points);
+       }
 }
 
 void
-TimeAxisView::get_inverted_selectables (Selection& /*sel*/, list<Selectable*>& /*result*/)
+TimeAxisView::get_inverted_selectables (Selection& sel, list<Selectable*>& results)
 {
-       return;
+       for (Children::iterator i = children.begin(); i != children.end(); ++i) {
+               if (!(*i)->hidden()) {
+                       (*i)->get_inverted_selectables (sel, results);
+               }
+       }
 }
 
 void
index f33379e4d63bc2660150b1d5a69f11d24721bf49..7f9e562ee11e88151e4172d86114c7b97514c550 100644 (file)
@@ -189,7 +189,7 @@ class TimeAxisView : public virtual AxisView
                            const int32_t sub_num) { return false; }
 
        virtual void set_selected_regionviews (RegionSelection&) {}
-       virtual void set_selected_points (PointSelection&) {}
+       virtual void set_selected_points (PointSelection&);
 
        virtual void fade_range (TimeSelection&) {}