summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-02-15 12:28:46 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-17 08:51:05 -0800
commitb60a3d71d3f7df8ab8f71d837a902a1fc6427766 (patch)
treecf00e9154c773a331a75a177bd5860147661e313 /qt-ui/diveplanner.cpp
parent55898c07ff329ce80252ea7a6e916db3b2f012bc (diff)
downloadsubsurface-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/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 84555bcd6..7831cc6d9 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -129,9 +129,9 @@ void DivePlannerPointsModel::loadFromDive(dive *d)
void DivePlannerPointsModel::setupCylinders()
{
if (mode == PLAN && current_dive) {
- // take the used cylinders from the selected dive as starting point
+ // take the displayed cylinders from the selected dive as starting point
CylindersModel::instance()->copyFromDive(current_dive);
- copy_cylinders(current_dive, &displayed_dive, false);
+ copy_cylinders(current_dive, &displayed_dive, !prefs.display_unused_tanks);
reset_cylinders(&displayed_dive, true);
return;
}