mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 08:37:19 +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() {
|
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) {
|
if (_hasRedone) {
|
||||||
qDebug() << "Doing redo!";
|
|
||||||
QMetaObject::invokeMethod(this, "doRedo");
|
QMetaObject::invokeMethod(this, "doRedo");
|
||||||
}
|
}
|
||||||
_hasRedone = true;
|
_hasRedone = true;
|
||||||
|
|
Loading…
Reference in a new issue