mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-27 07:28:17 +01:00
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:
parent
570ed69d2a
commit
3ec58e478c
5 changed files with 51 additions and 21 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue