undo问题
This commit is contained in:
@@ -361,8 +361,7 @@ export class Stage extends Laya.Script {
|
|||||||
const undo = this.data.pop_undo()
|
const undo = this.data.pop_undo()
|
||||||
if (undo) {
|
if (undo) {
|
||||||
// console.log("onClickUndo>>>>", JSON.stringify(undo))
|
// console.log("onClickUndo>>>>", JSON.stringify(undo))
|
||||||
this.selectedBlock = this.blocks[undo.index]
|
this.onApplyBlock(this.blocks[undo.index])
|
||||||
this.onApplyBlock(this.selectedBlock)
|
|
||||||
if (undo.notes && undo.notes.length > 0) {
|
if (undo.notes && undo.notes.length > 0) {
|
||||||
this.selectedBlock.setNotes(undo.notes)
|
this.selectedBlock.setNotes(undo.notes)
|
||||||
} else {
|
} else {
|
||||||
@@ -372,8 +371,7 @@ export class Stage extends Laya.Script {
|
|||||||
const undos = this.data.get_undos()
|
const undos = this.data.get_undos()
|
||||||
if (undos.length > 0) {
|
if (undos.length > 0) {
|
||||||
const last = undos[undos.length - 1]
|
const last = undos[undos.length - 1]
|
||||||
this.selectedBlock = this.blocks[last.index]
|
this.onApplyBlock(this.blocks[last.index])
|
||||||
this.onApplyBlock(this.selectedBlock)
|
|
||||||
}
|
}
|
||||||
this.onSetBlock(this.selectedBlock)
|
this.onSetBlock(this.selectedBlock)
|
||||||
this.onUpdateCandys()
|
this.onUpdateCandys()
|
||||||
|
|||||||
Reference in New Issue
Block a user