Dive d/l selection UI: fix check if things were checked

Math is hard.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-01-08 10:00:30 -08:00
parent 847289605b
commit 17b9597f3e

View file

@ -584,8 +584,8 @@ void DiveImportedModel::removeUnused() {
beginRemoveRows(QModelIndex(), 0, rowCount()-1); beginRemoveRows(QModelIndex(), 0, rowCount()-1);
endRemoveRows(); endRemoveRows();
for(int i = lastIndex; i >= firstIndex; i-- ){ for (int i = lastIndex; i >= firstIndex; i-- ) {
if(!checkStates[firstIndex - i]) { if (!checkStates[i - firstIndex]) {
delete_single_dive(i); delete_single_dive(i);
} }
} }