aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/models.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index faf22de51..81e17edc2 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -2390,7 +2390,19 @@ QVariant BuddyFilterModel::data(const QModelIndex &index, int role) const
bool BuddyFilterModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
- return QStringListModel::setData(index, value, role);
+ if (role == Qt::CheckStateRole) {
+ checkState[index.row()] = value.toBool();
+ anyChecked = false;
+ for (int i = 0; i < rowCount(); i++) {
+ if (checkState[i] == true) {
+ anyChecked = true;
+ break;
+ }
+ }
+ dataChanged(index, index);
+ return true;
+ }
+ return false;
}
MultiFilterSortModel *MultiFilterSortModel::instance()