record unsaved changes when toggling a Boolean input slot

pull/95/head
jmoenig 2020-12-22 16:18:45 +01:00
rodzic 36742405f4
commit 15a47ace9a
1 zmienionych plików z 9 dodań i 3 usunięć

Wyświetl plik

@ -10528,15 +10528,21 @@ BooleanSlotMorph.prototype.setContents = function (boolOrNull) {
BooleanSlotMorph.prototype.toggleValue = function () {
var target = this.selectForEdit(),
block = this.parentThatIsA(BlockMorph),
ide;
if (target !== this) {
return this.toggleValue.call(target);
}
ide = this.parentThatIsA(IDE_Morph);
this.value = this.nextValue();
if (ide && !ide.isAnimating) {
this.rerender();
return;
if (ide) {
if (!block.isTemplate) {
ide.recordUnsavedChanges();
}
if (!ide.isAnimating) {
this.rerender();
return;
}
}
this.progress = 3;
this.rerender();