diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-08-08 16:46:31 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-08-08 16:46:31 +0200 |
| commit | e23a6ab4b3ebf0a4309a65ce615ffc010b383e4e (patch) | |
| tree | 2ed19ad9835d34250de72f580cccff67f48f76e8 /gui.js | |
| parent | 5a20678faa3858ac69ece7049cf824ce7b8f3db1 (diff) | |
| download | snap-e23a6ab4b3ebf0a4309a65ce615ffc010b383e4e.tar.gz snap-e23a6ab4b3ebf0a4309a65ce615ffc010b383e4e.zip | |
correct 5a2067 (pasted code at the wrong positionissue_557
Diffstat (limited to 'gui.js')
| -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(); |
