diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-01-09 12:17:02 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-09 12:42:09 -0800 |
commit | 80af8e7fa2946bd5b869689d626e9c6ebb4fefaf (patch) | |
tree | 4883deb88d45c3f95457c8c2401645fae14b1abf /qt-ui | |
parent | 15fb6158bca814d9cd223e6068d1addc2a88cc88 (diff) | |
download | subsurface-80af8e7fa2946bd5b869689d626e9c6ebb4fefaf.tar.gz |
Dive d/l selection UI: update checkmark state correctly
This fixes the issue where there was no visual feedback when clicking on
the second or third column in the grid. It would actually change the
checked state of the checkmark internally (and you would see the new state
once you clicked on another dive), but it wouldn't give immediate visual
feedback.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 6 | ||||
-rw-r--r-- | qt-ui/downloadfromdivecomputer.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index e78270ab0..c0c8e8b1c 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -602,10 +602,10 @@ bool DiveImportedModel::setData(const QModelIndex &index, const QVariant &value, return true; } -void DiveImportedModel::changeSelected(QModelIndex index) +void DiveImportedModel::changeSelected(QModelIndex clickedIndex) { - checkStates[index.row()] = !checkStates[index.row()]; - dataChanged(index, index, QVector<int>() << Qt::CheckStateRole); + checkStates[clickedIndex.row()] = !checkStates[clickedIndex.row()]; + dataChanged(index(0, clickedIndex.row()), index(0, clickedIndex.row()), QVector<int>() << Qt::CheckStateRole); } void DiveImportedModel::selectAll() diff --git a/qt-ui/downloadfromdivecomputer.h b/qt-ui/downloadfromdivecomputer.h index c010fa0fd..efec64f80 100644 --- a/qt-ui/downloadfromdivecomputer.h +++ b/qt-ui/downloadfromdivecomputer.h @@ -41,7 +41,7 @@ public: public slots: - void changeSelected(QModelIndex index); + void changeSelected(QModelIndex clickedIndex); void selectAll(); void selectNone(); |