Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
daksh4469 authored and walterbender committed May 13, 2021
1 parent 6eef801 commit 82cf970
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 82cf970

Please sign in to comment.