From 32e54ab4f6582d724c910c00721a53102afe5ea8 Mon Sep 17 00:00:00 2001 From: Daksh Doshi Date: Thu, 22 Apr 2021 13:39:59 +0530 Subject: [PATCH] fix: force-stop the running program on new project --- js/activity.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/activity.js b/js/activity.js index 7066d5593a..2ed4787283 100644 --- a/js/activity.js +++ b/js/activity.js @@ -2921,7 +2921,15 @@ function Activity() { */ _afterDelete = function () { toolbar.closeAuxToolbar(_showHideAuxMenu); - sendAllToTrash(true, false); + + if(turtles.running()){ + that.doHardStopButton(); + } + + setTimeout(() => { + sendAllToTrash(true, false); + },1000); + if (planet !== undefined) { planet.initialiseNewProject.bind(planet); }