[Scummvm-git-logs] scummvm master -> 75231868db8805b2146ea691893c66120f1b3282
sev-
noreply at scummvm.org
Thu Dec 8 22:19:48 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
75231868db GUI: Place empty metadata games last when sorting
Commit: 75231868db8805b2146ea691893c66120f1b3282
https://github.com/scummvm/scummvm/commit/75231868db8805b2146ea691893c66120f1b3282
Author: Roberto Sánchez (robertosanchez_9 at protonmail.com)
Date: 2022-12-08T23:19:45+01:00
Commit Message:
GUI: Place empty metadata games last when sorting
Changed paths:
gui/widgets/groupedlist.cpp
diff --git a/gui/widgets/groupedlist.cpp b/gui/widgets/groupedlist.cpp
index c370b5f581d..a14e796218f 100644
--- a/gui/widgets/groupedlist.cpp
+++ b/gui/widgets/groupedlist.cpp
@@ -107,7 +107,12 @@ void GroupedListWidget::sortGroups() {
_list.clear();
_listIndex.clear();
- Common::sort(_groupHeaders.begin(), _groupHeaders.end());
+ Common::sort(_groupHeaders.begin(), _groupHeaders.end(),
+ [](const Common::String &first, const Common::String &second) {
+ return first.empty() ? 0 : second.empty() ? 1 : first < second;
+ }
+
+ );
uint curListSize = 0;
for (uint i = 0; i != _groupHeaders.size(); ++i) {
More information about the Scummvm-git-logs
mailing list