Browse Source

Merge pull request #1189 from Azaezel/alpha41/copyPastePunt

when pasting, ensure you add a unique name
Brian Roberts 1 năm trước cách đây
mục cha
commit
3d4b7b469c
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      Engine/source/gui/worldEditor/worldEditor.cpp

+ 4 - 0
Engine/source/gui/worldEditor/worldEditor.cpp

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