diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/models.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 47fc4dd66..88c2c4331 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -2503,7 +2503,19 @@ void LocationFilterModel::repopulate() bool LocationFilterModel::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() |