diff --git a/src/views/Stage.ts b/src/views/Stage.ts index 16debdd..1442596 100644 --- a/src/views/Stage.ts +++ b/src/views/Stage.ts @@ -361,8 +361,7 @@ export class Stage extends Laya.Script { const undo = this.data.pop_undo() if (undo) { // console.log("onClickUndo>>>>", JSON.stringify(undo)) - this.selectedBlock = this.blocks[undo.index] - this.onApplyBlock(this.selectedBlock) + this.onApplyBlock(this.blocks[undo.index]) if (undo.notes && undo.notes.length > 0) { this.selectedBlock.setNotes(undo.notes) } else { @@ -372,8 +371,7 @@ export class Stage extends Laya.Script { const undos = this.data.get_undos() if (undos.length > 0) { const last = undos[undos.length - 1] - this.selectedBlock = this.blocks[last.index] - this.onApplyBlock(this.selectedBlock) + this.onApplyBlock(this.blocks[last.index]) } this.onSetBlock(this.selectedBlock) this.onUpdateCandys()