mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
add "shift" method used in 2.X and now a3 to move data starting at a position, not an iterator
git-svn-id: svn://localhost/ardour2/branches/3.0@8208 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a9275f997b
commit
b83f21c3cf
2 changed files with 21 additions and 0 deletions
|
|
@ -534,6 +534,26 @@ ControlList::slide (iterator before, double distance)
|
|||
(*before)->when += distance;
|
||||
++before;
|
||||
}
|
||||
|
||||
mark_dirty ();
|
||||
}
|
||||
|
||||
maybe_signal_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
ControlList::shift (double pos, double frames)
|
||||
{
|
||||
{
|
||||
Glib::Mutex::Lock lm (_lock);
|
||||
|
||||
for (iterator i = _events.begin(); i != _events.end(); ++i) {
|
||||
if ((*i)->when >= pos) {
|
||||
(*i)->when += frames;
|
||||
}
|
||||
}
|
||||
|
||||
mark_dirty ();
|
||||
}
|
||||
|
||||
maybe_signal_changed ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue