diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-02-15 12:28:46 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-17 08:51:05 -0800 |
commit | b60a3d71d3f7df8ab8f71d837a902a1fc6427766 (patch) | |
tree | cf00e9154c773a331a75a177bd5860147661e313 /qt-ui/models.cpp | |
parent | 55898c07ff329ce80252ea7a6e916db3b2f012bc (diff) | |
download | subsurface-b60a3d71d3f7df8ab8f71d837a902a1fc6427766.tar.gz |
Use unused cylinders in planner if they are displayed
This makes prefs.display_unused_tanks also relevant for the planner.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index f0c15d486..fec7d02ed 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -367,7 +367,8 @@ void CylindersModel::copyFromDive(dive *d) return; rows = 0; for (int i = 0; i < MAX_CYLINDERS; i++) { - if (!cylinder_none(&d->cylinder[i]) && is_cylinder_used(d, i)) { + if (!cylinder_none(&d->cylinder[i]) && + (is_cylinder_used(d, i) || prefs.display_unused_tanks)) { rows = i + 1; } } |