diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-05-15 07:54:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-15 07:54:02 +0200 |
commit | 2065d304147e5d919d92c321188862f663917131 (patch) | |
tree | 67f972764b9b4935397f4dab2ab79bc6b3927185 /editor | |
parent | 1b5c57916688b384be8aeacfb3aaedcf6e956d6e (diff) | |
parent | f2564ca97fd6a25bc68f2e7302461970306fc837 (diff) |
Merge pull request #8717 from damianday/master
Fix natural sorting order in EditorFileDialog, FileDialog and EditorFileSystemDirectory
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_file_dialog.cpp | 4 | ||||
-rw-r--r-- | editor/editor_file_system.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 1f97aba221..c2e829e312 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -552,8 +552,8 @@ void EditorFileDialog::update_file_list() { dirs.push_back(".."); } - dirs.sort_custom<NoCaseComparator>(); - files.sort_custom<NoCaseComparator>(); + dirs.sort_custom<NaturalNoCaseComparator>(); + files.sort_custom<NaturalNoCaseComparator>(); while (!dirs.empty()) { const String &dir_name = dirs.front()->get(); diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index b7070ab5f6..64a9d5df82 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -522,8 +522,8 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess da->list_dir_end(); - dirs.sort(); - files.sort(); + dirs.sort_custom<NaturalNoCaseComparator>(); + files.sort_custom<NaturalNoCaseComparator>(); int total = dirs.size() + files.size(); int idx = 0; |