undo 问题

This commit is contained in:
2025-05-29 18:01:54 +08:00
parent 445d19af79
commit ce62736c40

View File

@@ -329,7 +329,6 @@ export class Stage extends Laya.Script {
} else { } else {
this.selectedBlock.setShowNumber(undo.show, 0) this.selectedBlock.setShowNumber(undo.show, 0)
} }
// this.onSetBlock(this.selectedBlock)
this.onUpdateScore() this.onUpdateScore()
const undos = this.data.get_undos() const undos = this.data.get_undos()
if (undos.length > 0) { if (undos.length > 0) {
@@ -337,6 +336,7 @@ export class Stage extends Laya.Script {
this.selectedBlock = this.blocks[last.index] this.selectedBlock = this.blocks[last.index]
this.onApplyBlock(this.selectedBlock) this.onApplyBlock(this.selectedBlock)
} }
this.onSetBlock(this.selectedBlock)
} }
} }