Sorted the folder link selection list.

This commit is contained in:
Leon Styhre 2022-09-08 21:49:57 +02:00
parent 294a795dd3
commit 9e9fa58cd0

View file

@ -437,6 +437,16 @@ GuiMetaDataEd::GuiMetaDataEd(MetaDataList* md,
} }
} }
#if defined(__unix__)
std::sort(std::begin(children), std::end(children),
[](FileData* a, FileData* b) { return a->getPath() < b->getPath(); });
#else
std::sort(std::begin(children), std::end(children), [](FileData* a, FileData* b) {
return Utils::String::toUpper(a->getPath()) <
Utils::String::toUpper(b->getPath());
});
#endif
// OK callback (apply new value to ed). // OK callback (apply new value to ed).
auto updateVal = [this, ed, originalValue](const std::string& newVal) { auto updateVal = [this, ed, originalValue](const std::string& newVal) {
mInvalidFolderLinkEntry = false; mInvalidFolderLinkEntry = false;