1
0
mirror of synced 2025-01-31 12:03:46 +01:00

impr: Properly sort choose file dialog entries

Fixes #938
This commit is contained in:
WerWolv 2023-02-17 14:59:19 +01:00
parent 94977ad216
commit ff525fe750

View File

@ -231,6 +231,12 @@ namespace hex::plugin::builtin {
EventManager::subscribe<RequestShowFileChooserPopup>([](const std::vector<std::fs::path> &paths, const std::vector<nfdfilteritem_t> &validExtensions, const std::function<void(std::fs::path)> &callback, bool multiple) {
s_selectableFileIndices = { };
s_selectableFiles = paths;
std::sort(s_selectableFiles.begin(), s_selectableFiles.end(),
[](const auto &a, const auto &b) {
return a.filename() < b.filename();
}
);
s_selectableFilesValidExtensions = validExtensions;
s_selectableFileOpenCallback = callback;
s_selectableFileMultiple = multiple;