[PATCH] Re: Minor planner bugs

Robert C. Helling helling at lmu.de
Thu Oct 22 06:34:00 PDT 2015


On Thu, 22 Oct 2015, Dirk Hohndel wrote:

> Maybe it's my mail client... but I can't find a patch in this email
>
> /D

But maybe in this one?

Best
Robert

-- 
.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oO
Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                       Scientific Coordinator
 		      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
print "Just another   Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339
     stupid .sig\n";   http://www.atdotde.de
-------------- next part --------------
From 8e9403fd4f64156eebe045e35cbd5167aa5db595 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <helling at atdotde.de>
Date: Wed, 21 Oct 2015 14:49:04 +0200
Subject: [PATCH] Set a cylinder if the default cylinder is bogus

Apparently, it can happen that the default cylinder is not set
even though same_string(prefs.default_cylinder, "") is false.
Then we fall back to the 11.1l air cylinder.

This should silence a warnign about "Too many gases".

Signed-off-by: Robert C. Helling <helling at atdotde.de>
---
 qt-models/diveplannermodel.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index 6556db5..70a7c6f 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -128,7 +128,8 @@ void DivePlannerPointsModel::setupCylinders()
 	}
 	if (!same_string(prefs.default_cylinder, "")) {
 		fill_default_cylinder(&displayed_dive.cylinder[0]);
-	} else {
+	}
+	if (cylinder_none(&displayed_dive.cylinder[0])) {
 		// roughly an AL80
 		displayed_dive.cylinder[0].type.description = strdup(tr("unknown").toUtf8().constData());
 		displayed_dive.cylinder[0].type.size.mliter = 11100;
-- 
2.3.8 (Apple Git-58)



More information about the subsurface mailing list