diff options
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-July-29'; +modules.gui = '2014-September-22'; // 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) { @@ -1857,7 +1859,7 @@ IDE_Morph.prototype.newSpriteName = function (name, ignoredSprite) { stem = (ix < 0) ? name : name.substring(0, ix), count = 1, newName = stem, - all = this.sprites.asArray().filter( + all = this.sprites.asArray().concat(this.stage).filter( function (each) {return each !== ignoredSprite; } ).map( function (each) {return each.name; } |
