}
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).
}
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 ();
}
}
} 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 ();
}
} else {
line->hide ();
+ for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
+ (*i)->hide ();
+ }
}
}
line->set (line_points);
- /* despite the name, this may show or hide things */
-
- show();
+ update_visibility ();
}
set_selected_points (trackview.editor().get_selection().points);
_visible = VisibleAspects (_visible | va);
if (old != _visible) {
- show ();
+ update_visibility ();
}
}
{
if (_visible != va) {
_visible = va;
- show ();
+ update_visibility ();
}
}
_visible = VisibleAspects (_visible & ~va);
if (old != _visible) {
- show ();
+ update_visibility ();
}
}