The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: ӔO on August 19, 2013, 03:54:47 AM

Title: r6656 line naming does not sort correctly when only one letter precedes number
Post by: ӔO on August 19, 2013, 03:54:47 AM
Example:

Z1
B2
A3
T4...

Expected behaviour:
A3
B2
T4
Z1
Title: Re: r6656 line naming does not sort correctly when only one letter precedes number
Post by: Ters on August 19, 2013, 04:29:49 AM
Either it doesn't sort at all, or this is intended. I can't see this happening by mistake.
Title: Re: r6656 line naming does not sort correctly when only one letter precedes number
Post by: ӔO on August 19, 2013, 05:06:28 AM
It will do

A1
B1
A2
B2
A3
A4
...
A10
etc.

so it does sort, but the string in front of the number needs to be more than one letter before it will.
Title: Re: r6656 line naming does not sort correctly when only one letter precedes number
Post by: kierongreen on August 19, 2013, 06:59:14 AM
This behaviour has been present since at least 111.2.2. As Ters say, I'm not sure whether this is a bug or a feature.
Title: Re: r6656 line naming does not sort correctly when only one letter precedes number
Post by: Ters on August 19, 2013, 02:31:49 PM
Strange feature. Sorting ignoring first letter doesn't happen by itself. Maybe it assumes that the first character is a parenthesis, as in (123) London-Paris.
Title: Re: r6656 line naming does not sort correctly when only one letter precedes number
Post by: prissi on August 26, 2013, 08:52:46 PM
Indeed it does, as those parenthesis will (or at least did) reappear after saving the line. Those were autogenerated and could not been edited away. Aparently this part of code broke then when free names were allowed.
Title: Re: r6656 line naming does not sort correctly when only one letter precedes number
Post by: Dwachs on August 31, 2013, 01:32:47 PM
Fixed with r6666.

Sorting will not ignore first character anymore (for the exception of opening parenthesis).