Hi,

On 15 Feb 2015, at 09:49, Robert C. Helling <[email protected]> wrote:

thank you for sending this. I had a similar patch some time ago and it was voted down but I would agree that this is the best resolution, so

Ack-by: Robert C. Helling <[email protected]>

after some more thought, I think we should let the user decide:

From 376edcbaf4ba1530e35cac62536bb78502302c34 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <[email protected]>
Date: Sun, 15 Feb 2015 12:28:46 +0100
Subject: [PATCH] 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 <[email protected]>
---
 qt-ui/diveplanner.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index f535a6a..434da1f 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -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;
        }
-- 
1.9.3 (Apple Git-50)


It seems, this is what is intended at other places as well, see void CylindersModel::updateDive()


Best
Robert

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to