diff options
| author | Tannin <devnull@localhost> | 2015-09-03 21:35:04 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-09-03 21:35:04 +0200 |
| commit | 84ec954073ff9e3230d222c1cdc0f3a5dd0c1476 (patch) | |
| tree | 11d47899025c781cc356eb4a9112a55132d3b435 /src | |
| parent | 63188eb6f352609d419f41e30fd82ad92f83a073 (diff) | |
more intuitive sorting with grouping active
Diffstat (limited to 'src')
| -rw-r--r-- | src/modlistsortproxy.cpp | 4 |
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);
|
