exercise subsurface rendering for x-fade curves
[ardour.git] / gtk2_ardour / automation_line.cc
index dbab83d6b9dac96d731ab8352db442d40ca2a392..7e37c32eb734f3a37d22a0ad5e51f86a2623e7f4 100644 (file)
@@ -138,10 +138,9 @@ AutomationLine::event_handler (GdkEvent* event)
 }
 
 void
-AutomationLine::show ()
+AutomationLine::update_visibility ()
 {
        if (_visible & Line) {
-               cerr << "AL visibile with vis = " << (hex) << _visible << dec << endl;
                /* Only show the line there are some points, otherwise we may show an out-of-date line
                   when automation points have been removed (the line will still follow the shape of the
                   old points).
@@ -153,12 +152,10 @@ AutomationLine::show ()
                }
 
                if (_visible & ControlPoints) {
-                       cerr << "AL visibile (just cp's with vis = " << (hex) << _visible << dec << endl;
                        for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
                                (*i)->show ();
                        }
                } else if (_visible & SelectedControlPoints) {
-                       cerr << "AL visibile (just selected cp's with vis = " << (hex) << _visible << dec << endl;
                        for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
                                if ((*i)->get_selected()) {
                                        (*i)->show ();
@@ -167,7 +164,6 @@ AutomationLine::show ()
                                }
                        }
                } else {
-                       cerr << "AL visibile (no cp's with vis = " << (hex) << _visible << dec << endl;
                        for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
                                (*i)->hide ();
                        }
@@ -175,6 +171,9 @@ AutomationLine::show ()
 
        } else {
                line->hide ();
+               for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
+                       (*i)->hide ();
+               }
        }
 
 }
@@ -1008,9 +1007,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
 
                line->set (line_points);
 
-               /* despite the name, this may show or hide things */
-
-               show();
+               update_visibility ();
        }
 
        set_selected_points (trackview.editor().get_selection().points);
@@ -1083,7 +1080,7 @@ AutomationLine::add_visibility (VisibleAspects va)
        _visible = VisibleAspects (_visible | va);
 
        if (old != _visible) {
-               show ();
+               update_visibility ();
        }
 }
 
@@ -1092,7 +1089,7 @@ AutomationLine::set_visibility (VisibleAspects va)
 {
        if (_visible != va) {
                _visible = va;
-               show ();
+               update_visibility ();
        }
 }
 
@@ -1104,7 +1101,7 @@ AutomationLine::remove_visibility (VisibleAspects va)
        _visible = VisibleAspects (_visible & ~va);
 
        if (old != _visible) {
-               show ();
+               update_visibility ();
        }
 }