mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
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:
parent
ed47f174bc
commit
7c5490e841
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue