aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index cda5ab5b2..15f3a92ed 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -2472,7 +2472,12 @@ LocationFilterModel::LocationFilterModel(QObject *parent): QStringListModel(pare
QVariant LocationFilterModel::data(const QModelIndex &index, int role) const
{
- return QStringListModel::data(index, role);
+ if (role == Qt::CheckStateRole) {
+ return checkState[index.row()] ? Qt::Checked : Qt::Unchecked;
+ } else if (role == Qt::DisplayRole) {
+ return stringList()[index.row()];
+ }
+ return QVariant();
}
bool LocationFilterModel::filterRow(int source_row, const QModelIndex &source_parent, QAbstractItemModel *sourceModel) const