From a2645683f15106175a9a9a94d3e3961197c3a76d Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 22 Dec 2020 15:02:33 +0100 Subject: [PATCH] record unsaved changes when making / deleting / duplicate custom block definitions --- snap.html | 2 +- src/byob.js | 4 +++- src/objects.js | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/snap.html b/snap.html index ab8b3653..66bec251 100755 --- a/snap.html +++ b/snap.html @@ -14,7 +14,7 @@ - + diff --git a/src/byob.js b/src/byob.js index 018f4e37..1ad438c3 100644 --- a/src/byob.js +++ b/src/byob.js @@ -107,7 +107,7 @@ WatcherMorph, Variable, BooleanSlotMorph, XML_Serializer, SnapTranslator*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2020-November-27'; +modules.byob = '2020-December-22'; // Declarations @@ -1278,6 +1278,7 @@ CustomCommandBlockMorph.prototype.duplicateBlockDefinition = function () { ide.flushPaletteCache(); ide.refreshPalette(); + ide.recordUnsavedChanges(); new BlockEditorMorph(dup, rcvr).popUp(); }; @@ -1318,6 +1319,7 @@ CustomCommandBlockMorph.prototype.deleteBlockDefinition = function () { if (ide) { ide.flushPaletteCache(); ide.refreshPalette(); + ide.recordUnsavedChanges(); } }, this diff --git a/src/objects.js b/src/objects.js index cfe04744..ec9695ed 100644 --- a/src/objects.js +++ b/src/objects.js @@ -2819,6 +2819,7 @@ SpriteMorph.prototype.makeBlock = function () { } ide.flushPaletteCache(); ide.refreshPalette(); + ide.recordUnsavedChanges(); new BlockEditorMorph(definition, this).popUp(); } },