Fix ungrouped undo-redo
This commit is contained in:
parent
a335ad18ff
commit
ba052ac305
1 changed files with 2 additions and 0 deletions
|
@ -137,6 +137,7 @@ class UndoManager {
|
||||||
} while (this.index >= 0 && currentGroupId === command.groupId)
|
} while (this.index >= 0 && currentGroupId === command.groupId)
|
||||||
} else {
|
} else {
|
||||||
await this.execute(command, 'undo')
|
await this.execute(command, 'undo')
|
||||||
|
this.index -= 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.onStateDidChange) {
|
if (this.onStateDidChange) {
|
||||||
|
@ -165,6 +166,7 @@ class UndoManager {
|
||||||
} while (this.index < this.commands.length - 1 && currentGroupId === command.groupId)
|
} while (this.index < this.commands.length - 1 && currentGroupId === command.groupId)
|
||||||
} else {
|
} else {
|
||||||
await this.execute(command, 'redo')
|
await this.execute(command, 'redo')
|
||||||
|
this.index += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.onStateDidChange) {
|
if (this.onStateDidChange) {
|
||||||
|
|
Loading…
Reference in a new issue