aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-08 10:00:30 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-08 10:00:30 -0800
commit17b9597f3e643f6742ed60611f9f99ff32f8a90d (patch)
treeb14e190ae763836af0ab454fd237155519105349 /qt-ui
parent847289605bb8903eee148018c8e53f5d4efe1d83 (diff)
downloadsubsurface-17b9597f3e643f6742ed60611f9f99ff32f8a90d.tar.gz
Dive d/l selection UI: fix check if things were checked
Math is hard. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index d91b94ba4..c1f711d71 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -584,8 +584,8 @@ void DiveImportedModel::removeUnused() {
beginRemoveRows(QModelIndex(), 0, rowCount()-1);
endRemoveRows();
- for(int i = lastIndex; i >= firstIndex; i-- ){
- if(!checkStates[firstIndex - i]) {
+ for (int i = lastIndex; i >= firstIndex; i-- ) {
+ if (!checkStates[i - firstIndex]) {
delete_single_dive(i);
}
}