diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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 <QPen> #include <QPainter> @@ -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) |