From 445e937a5b27df975b80ff171ecb460f9248b63d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 10 Jun 2014 09:24:10 -0700 Subject: Planner: show the GF used for planning on top of the profile Showing the GF in the preferences is just confusing. Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveprofileitem.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index f88eef372..0e8b63533 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -8,6 +8,7 @@ #include "dive.h" #include "preferences.h" #include "helpers.h" +#include "diveplanner.h" #include #include @@ -551,7 +552,13 @@ void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const Q setBrush(pat); gradientFactor->setX(poly.boundingRect().width() / 2 + poly.boundingRect().x()); - gradientFactor->setText(QString("GF %1/%2").arg(prefs.gflow).arg(prefs.gfhigh)); + DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance(); + if (plannerModel->isPlanner()) { + struct diveplan &diveplan = plannerModel->getDiveplan(); + gradientFactor->setText(QString("GF %1/%2").arg(diveplan.gflow).arg(diveplan.gfhigh)); + } else { + gradientFactor->setText(QString("GF %1/%2").arg(prefs.gflow).arg(prefs.gfhigh)); + } } void DiveCalculatedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) -- cgit v1.2.3-70-g09d2