razor tool: only push an undocommand if blocks were actually detected to split

This commit is contained in:
itsmattkc
2020-01-02 05:01:39 +11:00
parent ae71b206cd
commit 104415a4de
+3 -1
View File
@@ -83,7 +83,9 @@ void TimelineWidget::RazorTool::MouseRelease(TimelineViewMouseEvent *event)
split_tracks_.clear();
Core::instance()->undo_stack()->push(new BlockSplitPreservingLinksCommand(blocks_to_split, {split_time}));
if (!blocks_to_split.isEmpty()) {
Core::instance()->undo_stack()->push(new BlockSplitPreservingLinksCommand(blocks_to_split, {split_time}));
}
dragging_ = false;
}