summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-07-30 12:39:33 +0200
committerjmoenig <jens@moenig.org>2014-07-30 12:39:33 +0200
commit9f7028dbf95262cde83a524abc59987736eb5d32 (patch)
treedd4a780fc2dacf0d81fa335cd081f13bfb53630c
parentb2399309e4f207d44f57c73f7a92c60f16c9d3ca (diff)
downloadsnap-9f7028dbf95262cde83a524abc59987736eb5d32.tar.gz
snap-9f7028dbf95262cde83a524abc59987736eb5d32.zip
propagate DELETE to nested sprite parts
-rw-r--r--gui.js6
-rwxr-xr-xhistory.txt1
2 files changed, 5 insertions, 2 deletions
diff --git a/gui.js b/gui.js
index e4c75dd..6af9137 100644
--- a/gui.js
+++ b/gui.js
@@ -69,7 +69,7 @@ SpeechBubbleMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2014-July-29';
+modules.gui = '2014-July-30';
// Declarations
@@ -1831,7 +1831,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) {
diff --git a/history.txt b/history.txt
index 6bb4137..b67e91c 100755
--- a/history.txt
+++ b/history.txt
@@ -2254,3 +2254,4 @@ ______
140730
------
* Objects: propagate HIDE and SHOW to nested sprite parts
+* GUI: propagate DELETE to nested sprite parts