diff options
author | pestophagous <pestophagous@users.noreply.github.com> | 2015-10-06 22:12:28 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-07 08:34:37 +0100 |
commit | 4f287b6f801d1689794c5a9177f2d95090fbe8d8 (patch) | |
tree | 97804e03336951e2bc0ae4557160b11a29369a2c /qt-ui | |
parent | 4b3a1174015e28e247b91a60164bcf37f12db583 (diff) | |
download | subsurface-4f287b6f801d1689794c5a9177f2d95090fbe8d8.tar.gz |
Bugfix for checkboxes in DC download window GUI repaint delay.
Bug was due to incorrect use of QAbstractItemModel::index.
The arguments should be in (row, col) sequence but we were
mistakenly passing in (col, row).
Fixes #820
Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index 1fef9f6bf..4c8fa6b4a 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -682,19 +682,19 @@ QVariant DiveImportedModel::data(const QModelIndex &index, int role) const void DiveImportedModel::changeSelected(QModelIndex clickedIndex) { checkStates[clickedIndex.row()] = !checkStates[clickedIndex.row()]; - dataChanged(index(0, clickedIndex.row()), index(0, clickedIndex.row()), QVector<int>() << Qt::CheckStateRole); + dataChanged(index(clickedIndex.row(), 0), index(clickedIndex.row(), 0), QVector<int>() << Qt::CheckStateRole); } void DiveImportedModel::selectAll() { memset(checkStates, true, lastIndex - firstIndex + 1); - dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole); + dataChanged(index(0, 0), index(lastIndex - firstIndex, 0), QVector<int>() << Qt::CheckStateRole); } void DiveImportedModel::selectNone() { memset(checkStates, false, lastIndex - firstIndex + 1); - dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole); + dataChanged(index(0, 0), index(lastIndex - firstIndex,0 ), QVector<int>() << Qt::CheckStateRole); } Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const |