summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/automation_line.cc39
1 files changed, 20 insertions, 19 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index efba3999c8..dbab83d6b9 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -141,6 +141,7 @@ void
AutomationLine::show ()
{
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).
@@ -150,32 +151,32 @@ AutomationLine::show ()
} else {
line->hide ();
}
- } else {
- line->hide();
- /* if the line is not visible, then no control points should be visible */
- for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
- (*i)->hide ();
- }
- return;
- }
- if (_visible & ControlPoints) {
- for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
- (*i)->show ();
- }
- } else if (_visible & SelectedControlPoints) {
- for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
- if ((*i)->get_selected()) {
+ 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 {
+ }
+ } 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 {
+ (*i)->hide ();
+ }
+ }
+ } 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 {
- for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
- (*i)->hide ();
- }
+ line->hide ();
}
+
}
void