restore presentation mode when using the extension prim to change languages

snap8
Jens Mönig 2022-04-05 16:50:42 +02:00
rodzic 7c62102ab0
commit ba4c0f63a2
2 zmienionych plików z 9 dodań i 3 usunięć

Wyświetl plik

@ -43,7 +43,8 @@
* api documentation update
* fixed help screen for FIND FIRST, thanks, Brian!
* MQTT library update, thanks, Simon!
* gui: library import dialog make-over for custom categories and hidden blocks, thanks, Michael!
* gui: library import dialog make-over for custom categories and hidden blocks, thanks, Michael!
* extensions: restore presentation mode when using the extension prim to change languages
### 2022-04-04
* objects: added speech-balloon-value-association support for ASK menu items

Wyświetl plik

@ -809,11 +809,16 @@ SnapExtensions.primitives.set(
function (lang, msg, proc) {
var ide = this.parentThatIsA(IDE_Morph),
disabled = ['receiveGo', 'receiveCondition', 'receiveMessage'],
callback = null;
flag = ide.isAppMode,
restoreMode = () => ide.toggleAppMode(flag),
callback = restoreMode;
ide.loadNewProject = false;
if (isString(msg) && !contains(disabled, proc.topBlock.selector)) {
// require an explicit user input to trigger a project reload
callback = () => ide.broadcast(msg);
callback = () => {
ide.broadcast(msg);
restoreMode();
};
}
ide.setLanguage(lang, callback, true); // don't save language setting
}