From 836e95d96437d1b3a0c4e0c3d9761ec5d9618a73 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 4 Mar 2014 10:03:14 -0500 Subject: fix/adjust logic used to display automation lines --- gtk2_ardour/automation_line.cc | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'gtk2_ardour/automation_line.cc') 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::iterator i = control_points.begin(); i != control_points.end(); ++i) { - (*i)->hide (); - } - return; - } - if (_visible & ControlPoints) { - for (vector::iterator i = control_points.begin(); i != control_points.end(); ++i) { - (*i)->show (); - } - } else if (_visible & SelectedControlPoints) { - for (vector::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::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::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::iterator i = control_points.begin(); i != control_points.end(); ++i) { (*i)->hide (); } } + } else { - for (vector::iterator i = control_points.begin(); i != control_points.end(); ++i) { - (*i)->hide (); - } + line->hide (); } + } void -- cgit v1.2.3