kopia lustrzana https://github.com/backface/turtlestitch
record unsaved changes when toggling a Boolean input slot
rodzic
36742405f4
commit
15a47ace9a
|
|
@ -10528,15 +10528,21 @@ BooleanSlotMorph.prototype.setContents = function (boolOrNull) {
|
||||||
|
|
||||||
BooleanSlotMorph.prototype.toggleValue = function () {
|
BooleanSlotMorph.prototype.toggleValue = function () {
|
||||||
var target = this.selectForEdit(),
|
var target = this.selectForEdit(),
|
||||||
|
block = this.parentThatIsA(BlockMorph),
|
||||||
ide;
|
ide;
|
||||||
if (target !== this) {
|
if (target !== this) {
|
||||||
return this.toggleValue.call(target);
|
return this.toggleValue.call(target);
|
||||||
}
|
}
|
||||||
ide = this.parentThatIsA(IDE_Morph);
|
ide = this.parentThatIsA(IDE_Morph);
|
||||||
this.value = this.nextValue();
|
this.value = this.nextValue();
|
||||||
if (ide && !ide.isAnimating) {
|
if (ide) {
|
||||||
this.rerender();
|
if (!block.isTemplate) {
|
||||||
return;
|
ide.recordUnsavedChanges();
|
||||||
|
}
|
||||||
|
if (!ide.isAnimating) {
|
||||||
|
this.rerender();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.progress = 3;
|
this.progress = 3;
|
||||||
this.rerender();
|
this.rerender();
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue