From 17b9597f3e643f6742ed60611f9f99ff32f8a90d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 8 Jan 2015 10:00:30 -0800 Subject: Dive d/l selection UI: fix check if things were checked Math is hard. Signed-off-by: Dirk Hohndel --- qt-ui/downloadfromdivecomputer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-ui') 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); } } -- cgit v1.2.3-70-g09d2