mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Add comment to new redo functionality
This commit is contained in:
parent
bdfdeecc46
commit
c802c74396
1 changed files with 5 additions and 1 deletions
|
@ -42,8 +42,12 @@ void ScriptUndoCommand::undo() {
|
|||
}
|
||||
|
||||
void ScriptUndoCommand::redo() {
|
||||
// QUndoStack will call `redo()` when adding a command to the stack. This
|
||||
// makes it difficult to work with commands that span a period of time - for instance,
|
||||
// the entity duplicate + move command that duplicates an entity and then moves it.
|
||||
// A better implementation might be to properly implement `mergeWith()` and `id()`
|
||||
// so that the two actions in the example would be merged.
|
||||
if (_hasRedone) {
|
||||
qDebug() << "Doing redo!";
|
||||
QMetaObject::invokeMethod(this, "doRedo");
|
||||
}
|
||||
_hasRedone = true;
|
||||
|
|
Loading…
Reference in a new issue