Fix Load Editor

This commit is contained in:
Guillaume Tauzin 2022-11-07 14:42:37 +01:00
parent 95769f4718
commit 6ee4eb2986

View file

@ -135,11 +135,15 @@
* ReviveEditorState -> SetEditor -> SetHistory * ReviveEditorState -> SetEditor -> SetHistory
* @param editorState * @param editorState
*/ */
public LoadEditor(editorState: IEditorState) { public LoadEditor(editorState: IEditorState) {
this.ReviveEditorState(editorState, (state) => { this.ReviveEditorState(editorState, (state) => {
this.SetEditor(state, (currentState) => { this.SetEditor(state, (currentState) => {
setTimeout(() => { 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); }, 200);
}); });
}); });