diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-10-21 14:49:04 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-23 05:57:46 +0900 |
commit | 2a977a0fcde76e6d321a4ae66706f7c874dc8fe3 (patch) | |
tree | 27eb33b0f8cdc2b771aa99c483ffb294bcb50da2 /qt-models | |
parent | 6495b629fedff6b7bb0ada72c8ddfe322043c28d (diff) | |
download | subsurface-2a977a0fcde76e6d321a4ae66706f7c874dc8fe3.tar.gz |
Set a cylinder if the default cylinder is bogus
Apparently, it can happen that the default cylinder is not set
even though same_string(prefs.default_cylinder, "") is false.
Then we fall back to the 11.1l air cylinder.
This should silence a warnign about "Too many gases".
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 6556db50b..70a7c6f62 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -128,7 +128,8 @@ void DivePlannerPointsModel::setupCylinders() } if (!same_string(prefs.default_cylinder, "")) { fill_default_cylinder(&displayed_dive.cylinder[0]); - } else { + } + if (cylinder_none(&displayed_dive.cylinder[0])) { // roughly an AL80 displayed_dive.cylinder[0].type.description = strdup(tr("unknown").toUtf8().constData()); displayed_dive.cylinder[0].type.size.mliter = 11100; |