undo: wrapped redo/undo functions to ensure prepare is called

This commit is contained in:
itsmattkc
2021-07-17 00:14:24 -07:00
parent 84e639606f
commit 52c5617159
29 changed files with 174 additions and 103 deletions
+3 -3
View File
@@ -927,7 +927,7 @@ void Node::InputArrayResize(const QString &id, int size, bool undoable)
if (undoable) {
Core::instance()->undo_stack()->push(c);
} else {
c->redo();
c->redo_now();
delete c;
}
}
@@ -2277,7 +2277,7 @@ void NodeSetPositionAndShiftSurroundingsCommand::redo()
if (commands_.isEmpty()) {
// Move first node
NodeSetPositionCommand* set_pos_command = new NodeSetPositionCommand(node_, relative_, position_, move_dependencies_);
set_pos_command->redo();
set_pos_command->redo_now();
commands_.append(set_pos_command);
// Get bounding rect
@@ -2308,7 +2308,7 @@ void NodeSetPositionAndShiftSurroundingsCommand::redo()
}
} else {
for (int i=0; i<commands_.size(); i++) {
commands_.at(i)->redo();
commands_.at(i)->redo_now();
}
}
}