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
@ -113,6 +113,7 @@ public:
|
|||||||
void x_scale (double factor);
|
void x_scale (double factor);
|
||||||
bool extend_to (double);
|
bool extend_to (double);
|
||||||
void slide (iterator before, double distance);
|
void slide (iterator before, double distance);
|
||||||
|
void shift (double before, double distance);
|
||||||
|
|
||||||
void rt_add (double when, double value);
|
void rt_add (double when, double value);
|
||||||
void add (double when, double value);
|
void add (double when, double value);
|
||||||
|
@ -534,6 +534,26 @@ ControlList::slide (iterator before, double distance)
|
|||||||
(*before)->when += distance;
|
(*before)->when += distance;
|
||||||
++before;
|
++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 ();
|
maybe_signal_changed ();
|
||||||
|
Loading…
Reference in New Issue
Block a user