mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
6daeb276ad
commit
445e937a5b
1 changed files with 8 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include "dive.h"
|
#include "dive.h"
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
#include "diveplanner.h"
|
||||||
|
|
||||||
#include <QPen>
|
#include <QPen>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
@ -551,7 +552,13 @@ void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const Q
|
||||||
setBrush(pat);
|
setBrush(pat);
|
||||||
|
|
||||||
gradientFactor->setX(poly.boundingRect().width() / 2 + poly.boundingRect().x());
|
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)
|
void DiveCalculatedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
|
|
Loading…
Add table
Reference in a new issue