record unsaved changes when relabelling a block

pull/95/head
jmoenig 2020-12-22 15:41:59 +01:00
rodzic a2645683f1
commit c075cff8f0
2 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -3363,7 +3363,12 @@ BlockMorph.prototype.relabel = function (alternativeSelectors) {
block.addShadow(new Point(3, 3)); block.addShadow(new Point(3, 3));
menu.addItem( menu.addItem(
block.doWithAlpha(1, () => block.fullImage()), block.doWithAlpha(1, () => block.fullImage()),
() => this.setSelector(selector, -offset) () => {
this.setSelector(selector, -offset);
this.scriptTarget().parentThatIsA(
IDE_Morph
).recordUnsavedChanges();
}
); );
}); });
menu.popup(this.world(), this.bottomLeft().subtract(new Point( menu.popup(this.world(), this.bottomLeft().subtract(new Point(

Wyświetl plik

@ -1352,6 +1352,9 @@ CustomCommandBlockMorph.prototype.relabel = function (alternatives) {
() => { () => {
this.definition = def; this.definition = def;
this.refresh(); this.refresh();
this.scriptTarget().parentThatIsA(
IDE_Morph
).recordUnsavedChanges();
} }
); );
}); });