diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-10-26 08:10:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 08:10:53 +0100 |
commit | 33ff670d3094e2a7d0d40fff582d1796f6e88b64 (patch) | |
tree | a56682d73e56d5e6aa8e0a3373cb9e3eb47d10e3 | |
parent | e16729a8c3664f6ca00665714c7d88acd4ef603e (diff) | |
parent | 0e392bd177032dac6856df9a21f0d72de5292b1b (diff) |
Merge pull request #43050 from Pleto/enhance_tileset_sorting
Enhancement for tileset sorting
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index cb3c0c8be0..e43b8c4b7f 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -413,7 +413,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 |