summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-07-30 18:25:11 +0200
committerGubolin <gubolin@fantasymail.de>2014-07-30 18:25:11 +0200
commit85ea3b6f1ce1f5bbd6021b64efef8ee34fb5ccb8 (patch)
tree9d3b02e63f40db23378fb3d49d45189a05ac73df /gui.js
parentb9ec43451b9feb0c743196e2b4c3419e5ff611f8 (diff)
parent0333925e916acc47c25cdcfec0c3be3d695a825f (diff)
downloadsnap-85ea3b6f1ce1f5bbd6021b64efef8ee34fb5ccb8.tar.gz
snap-85ea3b6f1ce1f5bbd6021b64efef8ee34fb5ccb8.zip
Merge branch 'master' of https://github.com/jmoenig/Snap--Build-Your-Own-Blocks
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui.js b/gui.js
index 9850184..a4e1dd5 100644
--- a/gui.js
+++ b/gui.js
@@ -1828,7 +1828,9 @@ IDE_Morph.prototype.duplicateSprite = function (sprite) {
};
IDE_Morph.prototype.removeSprite = function (sprite) {
- var idx = this.sprites.asArray().indexOf(sprite) + 1;
+ var idx, myself = this;
+ sprite.parts.forEach(function (part) {myself.removeSprite(part); });
+ idx = this.sprites.asArray().indexOf(sprite) + 1;
this.stage.threads.stopAllForReceiver(sprite);
sprite.destroy();
this.stage.watchers().forEach(function (watcher) {