Enhancement for tileset sorting

(cherry picked from commit 0e392bd177)
This commit is contained in:
Pleto 2020-10-24 15:35:24 +03:00 committed by Rémi Verschelde
parent 5740bd808a
commit 203d6375fc
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -424,7 +424,9 @@ struct _PaletteEntry {
String name;
bool operator<(const _PaletteEntry &p_rhs) const {
return name < p_rhs.name;
// Natural no case comparison will compare strings based on CharType
// order (except digits) and on numbers that start on the same position.
return name.naturalnocasecmp_to(p_rhs.name) < 0;
}
};
} // namespace