The International Simutrans Forum

 

Author Topic: r6656 line naming does not sort correctly when only one letter precedes number  (Read 1588 times)

0 Members and 1 Guest are viewing this topic.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Example:

Z1
B2
A3
T4...

Expected behaviour:
A3
B2
T4
Z1

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5695
  • Languages: EN, NO
Either it doesn't sort at all, or this is intended. I can't see this happening by mistake.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
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.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2346
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5695
  • Languages: EN, NO
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4899
  • Languages: EN, DE, AT
Fixed with r6666.

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