From b451a08812fbf1a4ae0481005a62dc1743bbe333 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 29 Jul 2014 10:50:36 +0200 Subject: duplicate and clone nested sprites --- gui.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 7e38095..7e98549 100644 --- a/gui.js +++ b/gui.js @@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-July-25'; +modules.gui = '2014-July-29'; // Declarations @@ -1824,12 +1824,9 @@ IDE_Morph.prototype.paintNewSprite = function () { IDE_Morph.prototype.duplicateSprite = function (sprite) { var duplicate = sprite.fullCopy(); - duplicate.name = this.newSpriteName(sprite.name); duplicate.setPosition(this.world().hand.position()); - this.stage.add(duplicate); + duplicate.appearIn(this); duplicate.keepWithin(this.stage); - this.sprites.add(duplicate); - this.corral.addSprite(duplicate); this.selectSprite(duplicate); }; -- cgit v1.3.1