summaryrefslogtreecommitdiff
path: root/src/modlistsortproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlistsortproxy.cpp')
-rw-r--r--src/modlistsortproxy.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp
index 0eeaa86f..4045d743 100644
--- a/src/modlistsortproxy.cpp
+++ b/src/modlistsortproxy.cpp
@@ -106,6 +106,10 @@ void ModListSortProxy::disableAllVisible()
bool ModListSortProxy::lessThan(const QModelIndex &left,
const QModelIndex &right) const
{
+ if (sourceModel()->hasChildren(left) || sourceModel()->hasChildren(right)) {
+ return QSortFilterProxyModel::lessThan(left, right);
+ }
+
bool lOk, rOk;
int leftIndex = left.data(Qt::UserRole + 1).toInt(&lOk);
int rightIndex = right.data(Qt::UserRole + 1).toInt(&rOk);