From 7328bfb034dbb2c329fcff7d63e5b34bc7963cd3 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 18 Jul 2014 15:21:19 +0200 Subject: ensure unique names when renaming costumes --- gui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 5990a2b..5bccd6d 100644 --- a/gui.js +++ b/gui.js @@ -5533,12 +5533,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; } -- cgit v1.3.1