From 6624f145174533fc1f9f2121b7cc9d86cf937f55 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 30 Mar 2020 15:14:06 +1100 Subject: [PATCH] timeline: temporarily disable optimization that doesn't re-cache after split Since waveforms are generated during the cache process, if clips don't cache, a waveform isn't generated for them. Therefore for now, this optimization will be disabled but should be re-enabled later when waveforms are improved to handle this situation. --- app/widget/timelinewidget/undo/undo.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/widget/timelinewidget/undo/undo.cpp b/app/widget/timelinewidget/undo/undo.cpp index d9b875c0e..3785bc0c6 100644 --- a/app/widget/timelinewidget/undo/undo.cpp +++ b/app/widget/timelinewidget/undo/undo.cpp @@ -370,7 +370,8 @@ BlockSplitCommand::BlockSplitCommand(TrackOutput* track, Block *block, rational void BlockSplitCommand::redo_internal() { - track_->BlockInvalidateCache(); + // FIXME: Reintroduce this optimization when block waveforms update automatically +// track_->BlockInvalidateCache(); static_cast(block_->parent())->AddNode(new_block_); Node::CopyInputs(block_, new_block_); @@ -388,12 +389,12 @@ void BlockSplitCommand::redo_internal() NodeParam::ConnectEdge(new_block_->output(), transition); } - track_->UnblockInvalidateCache(); +// track_->UnblockInvalidateCache(); } void BlockSplitCommand::undo_internal() { - track_->BlockInvalidateCache(); +// track_->BlockInvalidateCache(); block_->set_length_and_media_out(old_length_); track_->RippleRemoveBlock(new_block_); @@ -405,7 +406,7 @@ void BlockSplitCommand::undo_internal() NodeParam::ConnectEdge(block_->output(), transition); } - track_->UnblockInvalidateCache(); +// track_->UnblockInvalidateCache(); } Block *BlockSplitCommand::new_block()