mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue