From 48828d6632a126c0967368eefd7114b9acebb076 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 7 Jun 2021 10:15:30 +1000 Subject: [PATCH] timeline: invalidate after place operation Fixes regression introduced in ef206e9532ac73cd10da0e965de43f5618f38a10 Fixes #1654 --- app/widget/timelinewidget/timelineundo.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/widget/timelinewidget/timelineundo.h b/app/widget/timelinewidget/timelineundo.h index 2f7c5282e..753e7d472 100644 --- a/app/widget/timelinewidget/timelineundo.h +++ b/app/widget/timelinewidget/timelineundo.h @@ -1413,6 +1413,10 @@ public: track->EndOperation(); + if (ripple_remove_command_) { + track->Node::InvalidateCache(TimeRange(insert_->in(), insert_->out()), Track::kBlockInput); + } + for (int i=0; iredo(); } @@ -1426,6 +1430,8 @@ public: Track* t = timeline_->GetTrackAt(track_index_); + TimeRange insert_range(insert_->in(), insert_->out()); + // Firstly, remove our insert t->BeginOperation(); t->RippleRemoveBlock(insert_); @@ -1439,6 +1445,10 @@ public: } t->EndOperation(); + if (ripple_remove_command_) { + t->Node::InvalidateCache(insert_range, Track::kBlockInput); + } + // Remove tracks if we added them for (int i=add_track_commands_.size()-1; i>=0; i--) { add_track_commands_.at(i)->undo();