Use a list of ControlPoints to hold the automation selection,

rather than a time range.  This makes more sense now that we
display every point on an automation line, rather than just
a subset.  Makes the code a fair bit simpler, and should fix
some unexpected behaviours, especially when cutting automation
points.


git-svn-id: svn://localhost/ardour2/branches/3.0@12054 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-04-22 14:03:07 +00:00
parent 82c867bf2a
commit a4434809e1
13 changed files with 139 additions and 365 deletions

View file

@ -557,37 +557,6 @@ ControlList::erase (double when, double value)
maybe_signal_changed ();
}
void
ControlList::reset_range (double start, double endt)
{
bool reset = false;
{
Glib::Mutex::Lock lm (_lock);
ControlEvent cp (start, 0.0f);
iterator s;
iterator e;
if ((s = lower_bound (_events.begin(), _events.end(), &cp, time_comparator)) != _events.end()) {
cp.when = endt;
e = upper_bound (_events.begin(), _events.end(), &cp, time_comparator);
for (iterator i = s; i != e; ++i) {
(*i)->value = _default_value;
}
reset = true;
mark_dirty ();
}
}
if (reset) {
maybe_signal_changed ();
}
}
void
ControlList::erase_range (double start, double endt)
{