From 82cf9707659d8f32b4d8393a3585cfde818cdb90 Mon Sep 17 00:00:00 2001 From: Daksh Doshi Date: Thu, 13 May 2021 10:08:32 -0400 Subject: [PATCH] ddaksh.2711@gmail.com --- js/activity.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/js/activity.js b/js/activity.js index 320ac507ba..42decf8f2b 100644 --- a/js/activity.js +++ b/js/activity.js @@ -2996,7 +2996,19 @@ function Activity() { */ const _afterDelete = function (that) { that.toolbar.closeAuxToolbar(showHideAuxMenu); - that.sendAllToTrash(true, false); + + if (that.turtles.running()) { + that._doHardStopButton(); + } + + setTimeout(() => { + // Don't create the new blocks in sendAllToTrash so as to + // avoid clearing the screen of any graphics. Do it here + // instead. + that.sendAllToTrash(false, false); + that.blocks.loadNewBlocks(DATAOBJS); + }, 1000); + if (that.planet !== undefined) { that.planet.initialiseNewProject.bind(that.planet); }