diff options
Diffstat (limited to 'gui.js')
| -rw-r--r-- | gui.js | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -69,7 +69,7 @@ SpeechBubbleMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2014-July-11'; +modules.gui = '2014-July-18'; // Declarations @@ -1498,7 +1498,9 @@ IDE_Morph.prototype.reactToWorldResize = function (rect) { IDE_Morph.prototype.droppedImage = function (aCanvas, name) { var costume = new Costume( aCanvas, - name ? name.split('.')[0] : '' // up to period + this.currentSprite.newCostumeName( + name ? name.split('.')[0] : '' // up to period + ) ); if (costume.isTainted()) { @@ -5372,6 +5374,7 @@ SpriteIconMorph.prototype.copyStack = function (block) { SpriteIconMorph.prototype.copyCostume = function (costume) { var dup = costume.copy(); + dup.name = this.object.newCostumeName(dup.name); this.object.addCostume(dup); this.object.wearCostume(dup); }; @@ -5531,12 +5534,13 @@ CostumeIconMorph.prototype.editRotationPointOnly = function () { CostumeIconMorph.prototype.renameCostume = function () { var costume = this.object, + wardrobe = this.parentThatIsA(WardrobeMorph), ide = this.parentThatIsA(IDE_Morph); new DialogBoxMorph( null, function (answer) { if (answer && (answer !== costume.name)) { - costume.name = answer; + costume.name = wardrobe.sprite.newCostumeName(answer); costume.version = Date.now(); ide.hasChangedMedia = true; } @@ -5928,7 +5932,10 @@ WardrobeMorph.prototype.removeCostumeAt = function (idx) { }; WardrobeMorph.prototype.paintNew = function () { - var cos = new Costume(newCanvas(), "Untitled"), + var cos = new Costume( + newCanvas(), + this.sprite.newCostumeName('Untitled') + ), ide = this.parentThatIsA(IDE_Morph), myself = this; cos.edit(this.world(), ide, true, null, function () { |
