diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-06-10 09:24:10 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-10 09:24:10 -0700 |
commit | 445e937a5b27df975b80ff171ecb460f9248b63d (patch) | |
tree | 3f011c5a4200cd6e9b025eb731e73c7671ba364a /qt-ui/profile/diveprofileitem.cpp | |
parent | 6daeb276ad00e0afe2145e151964af56370bede6 (diff) | |
download | subsurface-445e937a5b27df975b80ff171ecb460f9248b63d.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-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) |