diff options
Diffstat (limited to 'qt-ui/downloadfromdivecomputer.cpp')
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index c66792550..6fa83e118 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -599,14 +599,14 @@ void DiveImportedModel::changeSelected(QModelIndex clickedIndex) void DiveImportedModel::selectAll() { - memset(checkStates, true, lastIndex - firstIndex); - dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1), QVector<int>() << Qt::CheckStateRole); + memset(checkStates, true, lastIndex - firstIndex + 1); + dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole); } void DiveImportedModel::selectNone() { - memset(checkStates, false, lastIndex - firstIndex); - dataChanged(index(0, 0), index(0, lastIndex - firstIndex - 1), QVector<int>() << Qt::CheckStateRole); + memset(checkStates, false, lastIndex - firstIndex + 1); + dataChanged(index(0, 0), index(0, lastIndex - firstIndex), QVector<int>() << Qt::CheckStateRole); } Qt::ItemFlags DiveImportedModel::flags(const QModelIndex &index) const |