diff options
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index a36db7daf..671225b86 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -570,7 +570,7 @@ QVariant DiveImportedModel::data(const QModelIndex &index, int role) const } if (role == Qt::CheckStateRole) { if (index.column() == 0) - return checkStates[index.row() + firstIndex] ? Qt::Checked : Qt::Unchecked; + return checkStates[index.row()] ? Qt::Checked : Qt::Unchecked; } return QVariant(); } @@ -586,7 +586,7 @@ bool DiveImportedModel::setData(const QModelIndex &index, const QVariant &value, if (role != Qt::CheckStateRole) return false; - checkStates[index.row() + firstIndex] = value.toBool(); + checkStates[index.row()] = value.toBool(); dataChanged(index, index, QVector<int>() << Qt::CheckStateRole); return true; } |