From 6ee4eb2986a2843629e5ac438c8e13999545f2a9 Mon Sep 17 00:00:00 2001 From: Guillaume Tauzin Date: Mon, 7 Nov 2022 14:42:37 +0100 Subject: [PATCH] Fix Load Editor --- public/smartcomponent/svg-layout-designer.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/smartcomponent/svg-layout-designer.ts b/public/smartcomponent/svg-layout-designer.ts index d4623fe..07310c7 100644 --- a/public/smartcomponent/svg-layout-designer.ts +++ b/public/smartcomponent/svg-layout-designer.ts @@ -135,11 +135,15 @@ * ReviveEditorState -> SetEditor -> SetHistory * @param editorState */ - public LoadEditor(editorState: IEditorState) { + public LoadEditor(editorState: IEditorState) { this.ReviveEditorState(editorState, (state) => { this.SetEditor(state, (currentState) => { setTimeout(() => { - this.app.Editor.SetHistory({ history: state.history, historyCurrentStep: state.historyCurrentStep }); + this.app.App.SetAppState(2, () => { + setTimeout(() => { + this.app.Editor.SetHistory({ history: state.history, historyCurrentStep: state.historyCurrentStep }); + }, 200); + }); }, 200); }); });