Skip to content
Snippets Groups Projects
Commit 373d571d authored by chrisgarrity's avatar chrisgarrity
Browse files

refresh blocks after setLocale promise returns

parent 3ed7a4b8
Branches
Tags
No related merge requests found
...@@ -148,11 +148,12 @@ class Blocks extends React.Component { ...@@ -148,11 +148,12 @@ class Blocks extends React.Component {
setLocale () { setLocale () {
this.workspace.getFlyout().setRecyclingEnabled(false); this.workspace.getFlyout().setRecyclingEnabled(false);
this.ScratchBlocks.ScratchMsgs.setLocale(this.props.locale); this.ScratchBlocks.ScratchMsgs.setLocale(this.props.locale);
this.props.vm.setLocale(this.props.locale, this.props.messages); this.props.vm.setLocale(this.props.locale, this.props.messages)
.then(() => {
this.workspace.updateToolbox(this.props.toolboxXML); this.workspace.updateToolbox(this.props.toolboxXML);
this.props.vm.refreshWorkspace(); this.props.vm.refreshWorkspace();
this.workspace.getFlyout().setRecyclingEnabled(true); this.workspace.getFlyout().setRecyclingEnabled(true);
});
} }
updateToolbox () { updateToolbox () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment