aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 4debafd9a..1e22f7da0 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -301,7 +301,8 @@ void CylindersModel::setDive(dive* d)
return;
rows = 0;
for(int i = 0; i < MAX_CYLINDERS; i++) {
- if (!cylinder_none(&d->cylinder[i])) {
+ if (!cylinder_none(&d->cylinder[i]) &&
+ (prefs.display_unused_tanks || d->cylinder[i].used)) {
rows = i+1;
}
}