Do not accumulate SessionEvent::Overwrite events #8576
This commit is contained in:
parent
86a594fe90
commit
a75c239c0c
@ -81,7 +81,7 @@ void
|
||||
Session::request_overwrite_buffer (boost::shared_ptr<Track> t, OverwriteReason why)
|
||||
{
|
||||
assert (t);
|
||||
SessionEvent *ev = new SessionEvent (SessionEvent::Overwrite, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0);
|
||||
SessionEvent *ev = new SessionEvent (SessionEvent::Overwrite, SessionEvent::Replace, SessionEvent::Immediate, 0, 0, 0.0);
|
||||
ev->set_track (t);
|
||||
ev->overwrite = why;
|
||||
queue_event (ev);
|
||||
|
@ -253,7 +253,13 @@ SessionEventManager::_replace_event (SessionEvent* ev)
|
||||
/* private, used only for events that can only exist once in the queue */
|
||||
|
||||
for (i = events.begin(); i != events.end(); ++i) {
|
||||
if ((*i)->type == ev->type) {
|
||||
if ((*i)->type == ev->type && ev->type == SessionEvent::Overwrite && (*i)->track.lock() == ev->track.lock()) {
|
||||
ret = true;
|
||||
delete ev;
|
||||
break;
|
||||
}
|
||||
else if ((*i)->type == ev->type && ev->type != SessionEvent::Overwrite) {
|
||||
assert (ev->type == SessionEvent::PunchIn || ev->type == SessionEvent::PunchOut || ev->type == SessionEvent::AutoLoop);
|
||||
(*i)->action_sample = ev->action_sample;
|
||||
(*i)->target_sample = ev->target_sample;
|
||||
if ((*i) == ev) {
|
||||
|
Loading…
Reference in New Issue
Block a user