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 fc83b2e..752b676 100644
--- a/gui.js
+++ b/gui.js
@@ -3455,6 +3455,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 {