From 92bf2dc1c2d0edd5fd059db0352e85be494be913 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 10 Jun 2012 14:14:01 +0000 Subject: [PATCH] Fix incorrect display of automation lines after points are removed. git-svn-id: svn://localhost/ardour2/branches/3.0@12645 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/automation_line.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 744ec806d4..f5d2669d0a 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -136,7 +136,11 @@ void AutomationLine::show () { if (_visible & Line) { - if (alist->interpolation() != AutomationList::Discrete) { + /* 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 (alist->interpolation() != AutomationList::Discrete && control_points.size() >= 2) { line->show(); } else { line->hide ();