summaryrefslogtreecommitdiff
path: root/src/modlistsortproxy.cpp
diff options
context:
space:
mode:
authorBrian Munro <brian.alexander.munro@gmail.com>2018-08-02 09:15:12 +0200
committerGitHub <noreply@github.com>2018-08-02 09:15:12 +0200
commit9a3a15b1f6339589be97e2546b7d532d30abc292 (patch)
tree2776d6834b92fdc95b5b26ab43e9e743e10c1128 /src/modlistsortproxy.cpp
parent886fb10288baf4f52af2ad812a1c2121e138a16e (diff)
parent1ea43586d8eb304d8e91bf7f1480d7e4db5ef05f (diff)
Merge pull request #454 from Modorganizer2/Develop
Release 2.1.4
Diffstat (limited to 'src/modlistsortproxy.cpp')
-rw-r--r--src/modlistsortproxy.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp
index 435967c9..88084ae1 100644
--- a/src/modlistsortproxy.cpp
+++ b/src/modlistsortproxy.cpp
@@ -208,6 +208,16 @@ bool ModListSortProxy::lessThan(const QModelIndex &left,
if (leftTime != rightTime)
return leftTime < rightTime;
} break;
+ case ModList::COL_GAME: {
+ if (leftMod->getGameName() != rightMod->getGameName()) {
+ lt = leftMod->getGameName() < rightMod->getGameName();
+ }
+ else {
+ int comp = QString::compare(leftMod->name(), rightMod->name(), Qt::CaseInsensitive);
+ if (comp != 0)
+ lt = comp < 0;
+ }
+ } break;
case ModList::COL_PRIORITY: {
// nop, already compared by priority
} break;