summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-08-08 16:46:31 +0200
committerGubolin <gubolin@fantasymail.de>2014-08-08 16:46:31 +0200
commite23a6ab4b3ebf0a4309a65ce615ffc010b383e4e (patch)
tree2ed19ad9835d34250de72f580cccff67f48f76e8
parent5a20678faa3858ac69ece7049cf824ce7b8f3db1 (diff)
downloadsnap-issue_557.tar.gz
snap-issue_557.zip
correct 5a2067 (pasted code at the wrong positionissue_557
-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();