diff options
author | Carl Hetherington <carl@carlh.net> | 2012-06-10 14:14:01 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-06-10 14:14:01 +0000 |
commit | 92bf2dc1c2d0edd5fd059db0352e85be494be913 (patch) | |
tree | b311aad6ea1593a55fb1442a8fc036b7d3a52772 /gtk2_ardour/automation_line.cc | |
parent | 0f039ad5a914b029a28631d939397791d1a9c91a (diff) |
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
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 6 |
1 files changed, 5 insertions, 1 deletions
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 (); |