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>
This commit is contained in:
Robert C. Helling 2015-02-15 12:28:46 +01:00 committed by Dirk Hohndel
parent 5dfec3b799
commit ea143e9668
2 changed files with 4 additions and 3 deletions

View file

@ -131,9 +131,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;
}