diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-02-02 20:29:44 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-02-02 12:37:24 -0800 |
commit | 1d8662006cbb5edae941315e30ede381c23a817b (patch) | |
tree | 88ff6ec54d5e4ed4e29f3b93bea04292ef986e5f /qt-models/cylindermodel.cpp | |
parent | a031dbbbd8fbd8a913e517cf1bea5d61311bf266 (diff) | |
download | subsurface-1d8662006cbb5edae941315e30ede381c23a817b.tar.gz |
In statistics, ignore gas use of planned dives
When merged with real dives, those would double count otherwise.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'qt-models/cylindermodel.cpp')
-rw-r--r-- | qt-models/cylindermodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index fe63cf6f2..d5220a56e 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -451,7 +451,7 @@ void CylindersModel::updateDive() for (int i = 0; i < MAX_CYLINDERS; i++) { if (!cylinder_none(&displayed_dive.cylinder[i]) && (prefs.display_unused_tanks || - is_cylinder_used(&displayed_dive, i) || + is_cylinder_used(&displayed_dive, i, false) || displayed_dive.cylinder[i].manually_added)) rows = i + 1; } @@ -468,7 +468,7 @@ void CylindersModel::copyFromDive(dive *d) rows = 0; for (int i = 0; i < MAX_CYLINDERS; i++) { if (!cylinder_none(&d->cylinder[i]) && - (is_cylinder_used(d, i) || prefs.display_unused_tanks)) { + (is_cylinder_used(d, i, false) || prefs.display_unused_tanks)) { rows = i + 1; } } @@ -517,7 +517,7 @@ void CylindersModel::remove(const QModelIndex &index) ((DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING && DivePlannerPointsModel::instance()->tankInUse(index.row())) || (DivePlannerPointsModel::instance()->currentMode() == DivePlannerPointsModel::NOTHING && - is_cylinder_used(&displayed_dive, index.row())))) { + is_cylinder_used(&displayed_dive, index.row(), false)))) { emit warningMessage(TITLE_OR_TEXT( tr("Cylinder cannot be removed"), tr("This gas is in use. Only cylinders that are not used in the dive can be removed."))); |