From 49240fe7c5fef9b7830bafd2430f9143105a6f69 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 5 Apr 2012 16:53:55 +0000 Subject: Draw all automation points, rather than trying to use a heuristic to show some at any given zoom level. This works because (1) automation data is obtained by sampling, and we control the sampling interval (2) automation data is filtered to remove co-linear points before becoming part of a ControlList. This commit removes some of the hairiest code in Ardour's GUI, which was responsible for figuring out which invisible control points were affected by an edit. The change is based on an experiment in mixbus done by Ben Loftis. git-svn-id: svn://localhost/ardour2/branches/3.0@11798 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/region_gain_line.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour/region_gain_line.cc') diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc index bc360f25d6..39e1b7fda3 100644 --- a/gtk2_ardour/region_gain_line.cc +++ b/gtk2_ardour/region_gain_line.cc @@ -24,6 +24,7 @@ #include "ardour/audioregion.h" #include "ardour/session.h" +#include "control_point.h" #include "region_gain_line.h" #include "audio_region_view.h" #include "utils.h" @@ -69,10 +70,6 @@ AudioRegionGainLine::start_drag_single (ControlPoint* cp, double x, float fracti void AudioRegionGainLine::remove_point (ControlPoint& cp) { - ModelRepresentation mr; - - model_representation (cp, mr); - trackview.editor().session()->begin_reversible_command (_("remove control point")); XMLNode &before = alist->get_state(); @@ -82,7 +79,7 @@ AudioRegionGainLine::remove_point (ControlPoint& cp) trackview.session()->add_command(new StatefulDiffCommand (rv.audio_region())); } - alist->erase (mr.start, mr.end); + alist->erase (cp.model()); trackview.editor().session()->add_command (new MementoCommand(*alist.get(), &before, &alist->get_state())); trackview.editor().session()->commit_reversible_command (); -- cgit v1.2.3