Merged PR 392: Events: Fix needing to use setTimeout for callbacks

This commit is contained in:
Eric Nguyen 2023-03-01 09:53:06 +00:00
parent 6792d5e105
commit 460669987d
8 changed files with 182 additions and 88 deletions

View file

@ -137,14 +137,10 @@
*/
public LoadEditor(editorState: IEditorState) {
this.ReviveEditorState(editorState, (state) => {
this.SetEditor(state, (currentState) => {
setTimeout(() => {
this.app.App.SetAppState(2, () => {
setTimeout(() => {
this.app.Editor.SetHistory({ history: state.history, historyCurrentStep: state.historyCurrentStep });
}, 200);
});
}, 200);
this.SetEditor(state, () => {
this.app.App.SetAppState(2, () => {
this.app.Editor.SetHistory({ history: state.history, historyCurrentStep: state.historyCurrentStep });
});
});
});
}