propagate DELETE to nested sprite parts

pull/3/merge
jmoenig 2014-07-30 12:39:33 +02:00
rodzic b2399309e4
commit 9f7028dbf9
2 zmienionych plików z 5 dodań i 2 usunięć

6
gui.js
Wyświetl plik

@ -69,7 +69,7 @@ SpeechBubbleMorph*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.gui = '2014-July-29'; modules.gui = '2014-July-30';
// Declarations // Declarations
@ -1831,7 +1831,9 @@ IDE_Morph.prototype.duplicateSprite = function (sprite) {
}; };
IDE_Morph.prototype.removeSprite = 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); this.stage.threads.stopAllForReceiver(sprite);
sprite.destroy(); sprite.destroy();
this.stage.watchers().forEach(function (watcher) { this.stage.watchers().forEach(function (watcher) {

Wyświetl plik

@ -2254,3 +2254,4 @@ ______
140730 140730
------ ------
* Objects: propagate HIDE and SHOW to nested sprite parts * Objects: propagate HIDE and SHOW to nested sprite parts
* GUI: propagate DELETE to nested sprite parts