mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-22 19:49:56 +00:00
Loads of stuff, amongst others d&d and many bug fixes
This commit is contained in:
@@ -8,5 +8,14 @@ CategorizedProxyModel::CategorizedProxyModel(QObject *parent)
|
||||
}
|
||||
bool CategorizedProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
||||
{
|
||||
return left.data(CategorizedView::CategoryRole).toString() < right.data(CategorizedView::CategoryRole).toString();
|
||||
const QString leftCategory = left.data(CategorizedView::CategoryRole).toString();
|
||||
const QString rightCategory = right.data(CategorizedView::CategoryRole).toString();
|
||||
if (leftCategory == rightCategory)
|
||||
{
|
||||
return left.row() < right.row();
|
||||
}
|
||||
else
|
||||
{
|
||||
return leftCategory < rightCategory;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user