diff options
| -rw-r--r-- | gui.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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(); |
