diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-08-08 12:21:06 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-08-08 12:21:06 +0200 |
| commit | 5a20678faa3858ac69ece7049cf824ce7b8f3db1 (patch) | |
| tree | 5eead6a2eb478b1dd5572542c238822d833bf318 | |
| parent | 0333925e916acc47c25cdcfec0c3be3d695a825f (diff) | |
| download | snap-5a20678faa3858ac69ece7049cf824ce7b8f3db1.tar.gz snap-5a20678faa3858ac69ece7049cf824ce7b8f3db1.zip | |
don't drop custom block definitions when changing the language (fix #557)
| -rw-r--r-- | gui.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -3440,6 +3440,12 @@ 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(); |
