summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/gui.js b/gui.js
index 9d6d952..14beb6b 100644
--- a/gui.js
+++ b/gui.js
@@ -3429,6 +3429,12 @@ IDE_Morph.prototype.setLanguage = function (lang, callback) {
IDE_Morph.prototype.reflectLanguage = function (lang, callback) {
var projectData;
SnapTranslator.language = lang;
+ this.world().children.forEach(function (morph) {
+ if (morph instanceof BlockEditorMorph) {
+ morph.updateDefinition(); // save custom blocks
+ // otherwise, initBlocks() will reset the definition
+ }
+ });
if (!this.loadNewProject) {
if (Process.prototype.isCatchingErrors) {
try {
@@ -3440,12 +3446,6 @@ IDE_Morph.prototype.reflectLanguage = function (lang, callback) {
projectData = this.serializer.serialize(this.stage);
}
}
- this.world().children.forEach(function (morph) {
- if (morph instanceof BlockEditorMorph) {
- morph.updateDefinition(); // save custom blocks
- // otherwise, initBlocks() will reset the definition
- }
- });
SpriteMorph.prototype.initBlocks();
this.spriteBar.tabBar.tabTo('scripts');
this.createCategories();