View Issue Details

IDProjectCategoryView StatusLast Update
0004859DarkRadiantGeneralpublic08.11.2020 18:36
Reportergrayman Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityalways
Status closedResolutionfixed 
Product Version2.6.0 
Target Version2.7.0Fixed in Version2.7.0 
Summary0004859: DR thinks an entity name of the form "Cylinder01" is the same as "Cylinder1"
DescriptionWhen I have a bunch of entities named like this:

Cylinder01
Cylinder2
Cylinder3

and I want to make them uniform by changing "Cylinder01" to "Cylinder1", DR tells me "Cylinder1" already exists.

Also, if I try to change "Cylinder2" to "Cylinder02", I get the same response.

DR is ignoring the leading zeros when doing string comparison.

I don't think it should, when dealing with the "name" key.
TagsNo tags attached.

Activities

greebo

greebo

24.09.2018 08:53

administrator   ~0010771

I can confirm this. The system as it is working right now also prevents simply renaming an entity from "Carl01" to "Carl1".

DR converts the number postfix of "Carl01" into an integer, and "01" gets mapped to the same integer value 1 as the string "1".

I can try to change the internals to keep the actual string representation of the number as key, and then check if this has any negative impact.
greebo

greebo

24.09.2018 09:18

administrator   ~0010772

Commit 749e321c changes the internal postfix format from int to std::string. I tested a few use-cases (copying map parts, renaming back and forth) and it seems to work ok.
grayman

grayman

24.09.2018 12:53

viewer   ~0010775

Thanks!

Related Changesets

DarkRadiant: master 749e321c

24.09.2018 11:10

greebo


Details Diff
Address issue 0004859: DR thinks an entity name of the form "Cylinder01" is the same as "Cylinder1".
The ComplexName structure is now keeping the string representation of the number postfix (e.g. "01") to check against name/postfix collisions when merging namespaces or renaming entities.
Affected Issues
0004859
mod - radiant/namespace/ComplexName.cpp Diff File
mod - radiant/namespace/ComplexName.h Diff File
mod - radiant/namespace/UniqueNameSet.h Diff File

Issue History

Date Modified Username Field Change
10.07.2018 02:13 grayman New Issue
12.07.2018 04:03 greebo Status new => acknowledged
24.09.2018 08:53 greebo Note Added: 0010771
24.09.2018 08:53 greebo Status acknowledged => confirmed
24.09.2018 09:17 greebo Assigned To => greebo
24.09.2018 09:17 greebo Status confirmed => assigned
24.09.2018 09:17 greebo Target Version => 2.7.0
24.09.2018 09:18 greebo Note Added: 0010772
24.09.2018 09:18 greebo Status assigned => resolved
24.09.2018 09:18 greebo Fixed in Version => 2.7.0
24.09.2018 09:18 greebo Resolution open => fixed
24.09.2018 12:53 grayman Note Added: 0010775
09.01.2020 19:25 greebo Changeset attached => DarkRadiant master 749e321c
08.11.2020 18:36 greebo Status resolved => closed