Allow deletion of program changes in the same way as notes.

git-svn-id: svn://localhost/ardour2/branches/3.0@8304 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-12-20 13:30:31 +00:00
parent 570ed69d2a
commit 3ec58e478c
5 changed files with 51 additions and 21 deletions

View file

@ -449,6 +449,28 @@ ControlList::erase (iterator start, iterator end)
maybe_signal_changed ();
}
/** Erase the first event which matches the given time and value */
void
ControlList::erase (double when, double value)
{
{
Glib::Mutex::Lock lm (_lock);
iterator i = begin ();
while (i != end() && ((*i)->when != when || (*i)->value != value)) {
++i;
}
if (i != end ()) {
_events.erase (i);
}
mark_dirty ();
}
maybe_signal_changed ();
}
void
ControlList::reset_range (double start, double endt)
{