diff options
| author | jmoenig <jens@moenig.org> | 2014-07-29 10:50:36 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-07-29 10:50:36 +0200 |
| commit | b451a08812fbf1a4ae0481005a62dc1743bbe333 (patch) | |
| tree | fa579fddb4c1587ef09c7076e16a51dcb89937b3 /gui.js | |
| parent | e572da6f654f076b91dd7cd3ca55b5326a33939e (diff) | |
| download | snap-b451a08812fbf1a4ae0481005a62dc1743bbe333.tar.gz snap-b451a08812fbf1a4ae0481005a62dc1743bbe333.zip | |
duplicate and clone nested sprites
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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); }; |
