record unsaved changes when editing input slots

pull/95/head
jmoenig 2020-12-22 16:10:21 +01:00
rodzic 9245248deb
commit 36742405f4
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -9001,7 +9001,12 @@ InputSlotMorph.prototype.setContents = function (data) {
InputSlotMorph.prototype.userSetContents = function (aStringOrFloat) {
// enable copy-on-edit for inherited scripts
var block = this.parentThatIsA(BlockMorph),
ide = this.parentThatIsA(IDE_Morph);
this.selectForEdit().setContents(aStringOrFloat);
if (ide && !block.isTemplate) {
ide.recordUnsavedChanges();
}
};
// InputSlotMorph drop-down menu:
@ -9814,7 +9819,12 @@ InputSlotMorph.prototype.reactToKeystroke = function () {
};
InputSlotMorph.prototype.reactToEdit = function () {
var block = this.parentThatIsA(BlockMorph),
ide = this.parentThatIsA(IDE_Morph);
this.contents().clearSelection();
if (ide && !block.isTemplate) {
ide.recordUnsavedChanges();
}
};
InputSlotMorph.prototype.freshTextEdit = function (aStringOrTextMorph) {