summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-03-04 10:03:14 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-03-04 21:58:17 -0500
commit836e95d96437d1b3a0c4e0c3d9761ec5d9618a73 (patch)
treec54ad4b836e7132c15bcc48e7f9c1067c8cf2dee /gtk2_ardour/automation_line.cc
parent6863bb9d28e59cf70a9dc5106ccee24c3295ad4c (diff)
fix/adjust logic used to display automation lines
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-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