Hi,

Commit 6ed189f32c466f99167ab6657264a45da4b56e8e "Planner: bring sanity
to the SAC rate handling" broke the planner's gas computations in the
following way:
- open the planner
- leave bottomsac and decosac to their default values
- customize pretty much anything else you want
- the plan reads "Gas consumption: 0ℓ/0bar"

However, changing bottomsac and decosac (even changing and then changing
back to the original values) somehow makes the planner correctly compute
gas consumption.

So I have no idea what is going on, but found out that the attached
patch (although it's certainly not the proper way to do things) fixes
the issue for me. 

Cheers.

-- 
Gaetan
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index ebaf6f5..a52a772 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -431,6 +431,8 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
 
 	setMinimumWidth(0);
 	setMinimumHeight(0);
+	bottomSacChanged(prefs.bottomsac / 1000.0);
+	decoSacChanged(prefs.decosac / 1000.0);
 }
 
 void PlannerSettingsWidget::updateUnitsUI()
_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to