when pasting, ensure you add a unique name

object names are namespaces, so they cannot match or it confuses the lookup tables
This commit is contained in:
AzaezelX 2024-01-29 13:06:02 -06:00
parent ed47f174bc
commit 7c5490e841

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 );