From 9ee523b1452b4dce8663cff548ac1fc02e836e3d Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sun, 29 Nov 2020 17:06:56 +1100 Subject: [PATCH] timeline: split gaps only if there's an insert Fixes regression from 97afae9687e85c26c40f7b318c72749cb253cf41 --- app/widget/timelinewidget/undo/undo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/widget/timelinewidget/undo/undo.cpp b/app/widget/timelinewidget/undo/undo.cpp index 4dbd34594..3195aa709 100644 --- a/app/widget/timelinewidget/undo/undo.cpp +++ b/app/widget/timelinewidget/undo/undo.cpp @@ -210,7 +210,7 @@ void TrackRippleRemoveAreaCommand::redo_internal() // If we picked up a block to splice if (splice_) { - if (trim_out_->type() == Block::kGap) { + if (trim_out_->type() == Block::kGap && !insert_) { // Gaps shouldn't be split, just trim the difference trim_out_->set_length_and_media_out(trim_out_->length() - (out_ - in_)); @@ -310,7 +310,7 @@ void TrackRippleRemoveAreaCommand::undo_internal() if (splice_) { - if (trim_out_->type() == Block::kGap) { + if (trim_out_->type() == Block::kGap && !insert_) { // Just restore the length trim_out_->set_length_and_media_out(trim_out_->length() + (out_ - in_));