From 9e9fa58cd0d6b4b84ec45958ad9c5ccd12d1d3ee Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 8 Sep 2022 21:49:57 +0200 Subject: [PATCH] Sorted the folder link selection list. --- es-app/src/guis/GuiMetaDataEd.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index 377865041..40593ba15 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -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). auto updateVal = [this, ed, originalValue](const std::string& newVal) { mInvalidFolderLinkEntry = false;