new undo system

Also enables undoing when working with node input arrays
This commit is contained in:
itsmattkc
2021-01-29 16:10:34 +11:00
parent 4e5db91c17
commit ad4b83a098
69 changed files with 1218 additions and 837 deletions
+2 -2
View File
@@ -68,13 +68,13 @@ void SlipTool::FinishDrag(TimelineViewMouseEvent *event)
{
Q_UNUSED(event)
QUndoCommand* command = new QUndoCommand();
MultiUndoCommand* command = new MultiUndoCommand();
// Find earliest point to ripple around
foreach (TimelineViewGhostItem* ghost, parent()->GetGhostItems()) {
Block* b = Node::ValueToPtr<Block>(ghost->GetData(TimelineViewGhostItem::kAttachedBlock));
new BlockSetMediaInCommand(b, ghost->GetAdjustedMediaIn(), command);
command->add_child(new BlockSetMediaInCommand(b, ghost->GetAdjustedMediaIn()));
}
Core::instance()->undo_stack()->pushIfHasChildren(command);