Fix: 修复重载Blockly workspace时代码区不同步刷新

This commit is contained in:
王立帮
2025-03-21 22:24:24 +08:00
parent 883dbb336d
commit 8f96688184

View File

@@ -213,7 +213,6 @@ class EditorBlockly extends EditorBase {
}
this.reloadWorkspace = () => {
Blockly.Events.disable();
let workspaceState = Blockly.serialization.workspaces.save(this.editor);
let undoStack = [...this.editor.undoStack_];
let redoStack = [...this.editor.redoStack_];
@@ -222,7 +221,6 @@ class EditorBlockly extends EditorBase {
});
this.editor.undoStack_ = [...undoStack];
this.editor.redoStack_ = [...redoStack];
Blockly.Events.enable();
}
this.initBlockly();