diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-08-06 07:08:31 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-06 07:08:31 -0700 |
commit | eb63ccfed58d7a9f391bd5032e576707d4a58b58 (patch) | |
tree | 43b2d1433532069ea2866c8ba6486de10aea2294 | |
parent | 71bed5022c52cf658ccfe4251460f2b94d68218a (diff) | |
download | subsurface-eb63ccfed58d7a9f391bd5032e576707d4a58b58.tar.gz |
Don't list gases that weren't used in profile print
If the divecomputer adds additional, unused cylinders to the dive, they
would be listed in the profile based printouts. Given that the field is
named "Gas used" that seems wrong.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/models.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 7fc941558..213a13d5f 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -1968,6 +1968,8 @@ QVariant ProfilePrintModel::data(const QModelIndex &index, int role) const int added = 0; QString gas, gases; for (int i = 0; i < MAX_CYLINDERS; i++) { + if (!is_cylinder_used(dive, i)) + continue; gas = dive->cylinder[i].type.description; gas += QString(!gas.isEmpty() ? " " : "") + gasname(&dive->cylinder[i].gasmix); // if has a description and if such gas is not already present |