From c7a3906c977f55547484fb665a02c0a1f46bbe56 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sat, 22 Feb 2020 00:49:57 +1100 Subject: [PATCH] timelineview: fixed bug that wouldn't invalidate all necessary regions of the cache when using rippleremovearea --- app/widget/timelinewidget/undo/undo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/widget/timelinewidget/undo/undo.cpp b/app/widget/timelinewidget/undo/undo.cpp index 39fe66494..796d0418a 100644 --- a/app/widget/timelinewidget/undo/undo.cpp +++ b/app/widget/timelinewidget/undo/undo.cpp @@ -179,6 +179,7 @@ void TrackRippleRemoveAreaCommand::redo() static_cast(track_->parent())->AddNode(copy); Node::CopyInputs(splice_, copy); + copy->set_length_and_media_in(splice_original_length_ - (out_ - splice_->in())); track_->InsertBlockAfter(copy, splice_); @@ -233,7 +234,7 @@ void TrackRippleRemoveAreaCommand::redo() track_->UnblockInvalidateCache(); - track_->InvalidateCache(in_, out_); + track_->InvalidateCache(in_, splice_ ? out_ : RATIONAL_MAX); } void TrackRippleRemoveAreaCommand::undo() @@ -277,7 +278,7 @@ void TrackRippleRemoveAreaCommand::undo() track_->UnblockInvalidateCache(); - track_->InvalidateCache(in_, out_); + track_->InvalidateCache(in_, splice_ ? out_ : RATIONAL_MAX); } TrackPlaceBlockCommand::TrackPlaceBlockCommand(TrackList *timeline, int track, Block *block, rational in, QUndoCommand *parent) :