Merged PR 392: Events: Fix needing to use setTimeout for callbacks
This commit is contained in:
parent
6792d5e105
commit
460669987d
8 changed files with 182 additions and 88 deletions
|
@ -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 });
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue