From 634f3c8e414f92a69ff262e9abbaf353f6b8d553 Mon Sep 17 00:00:00 2001 From: yangwen Date: Mon, 16 Jun 2025 14:15:03 +0800 Subject: [PATCH] =?UTF-8?q?undo=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Stage.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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()