Made empty sprite name turn into Sprite<n> instead of <n>

This commit is contained in:
Nathan Dinsmore 2014-06-24 18:01:03 -04:00
parent 7a201faa47
commit f364eaaab4

View file

@ -664,7 +664,7 @@ public class ScratchRuntime {
public function renameSprite(newName:String):void {
var obj:ScratchObj = app.viewedObj();
obj.objName = '';
newName = app.stagePane.unusedSpriteName(newName);
newName = app.stagePane.unusedSpriteName(newName || 'Sprite1');
var oldName:String = obj.objName;
obj.objName = newName;
for each (var lw:ListWatcher in app.viewedObj().lists) {