summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui.js b/gui.js
index 6af9137..9d6d952 100644
--- a/gui.js
+++ b/gui.js
@@ -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();