Merge pull request #1189 from Azaezel/alpha41/copyPastePunt

when pasting, ensure you add a unique name
This commit is contained in:
Brian Roberts 2024-01-29 17:49:52 -06:00 committed by GitHub
commit 3d4b7b469c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -487,6 +487,10 @@ bool WorldEditor::pasteSelection( bool dropSel )
if ( !obj )
continue;
StringTableEntry baseName = obj->getName();
String outName = (baseName != StringTable->EmptyString()) ? Sim::getUniqueName(baseName) : StringTable->EmptyString();
obj->assignName(outName);
if (targetGroup)
targetGroup->addObject( obj );