diff options
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/divetooltipitem.cpp | 4 | ||||
-rw-r--r-- | profile-widget/divetooltipitem.h | 2 | ||||
-rw-r--r-- | profile-widget/profilewidget2.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/profile-widget/divetooltipitem.cpp b/profile-widget/divetooltipitem.cpp index aec8de96a..46e825bcd 100644 --- a/profile-widget/divetooltipitem.cpp +++ b/profile-widget/divetooltipitem.cpp @@ -217,7 +217,7 @@ void ToolTipItem::setTimeAxis(DiveCartesianAxis *axis) timeAxis = axis; } -void ToolTipItem::refresh(const dive *d, const QPointF &pos) +void ToolTipItem::refresh(const dive *d, const QPointF &pos, bool inPlanner) { static QPixmap tissues(16,60); static QPainter painter(&tissues); @@ -249,7 +249,7 @@ void ToolTipItem::refresh(const dive *d, const QPointF &pos) const struct plot_data *entry = &pInfo.entry[idx]; painter.setPen(QColor(0, 0, 0, 255)); - if (decoMode() == BUEHLMANN) + if (decoMode(inPlanner) == BUEHLMANN) painter.drawLine(0, lrint(60 - entry->gfline / 2), 16, lrint(60 - entry->gfline / 2)); painter.drawLine(0, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure / 2), 16, lrint(60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure /2)); diff --git a/profile-widget/divetooltipitem.h b/profile-widget/divetooltipitem.h index c19cbd138..b9a3e4bff 100644 --- a/profile-widget/divetooltipitem.h +++ b/profile-widget/divetooltipitem.h @@ -35,7 +35,7 @@ public: void collapse(); void expand(); void clear(); - void refresh(const dive *d, const QPointF &pos); + void refresh(const dive *d, const QPointF &pos, bool inPlanner); bool isExpanded() const; void persistPos(); void readPos(); diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 5d37496e3..62a14ea5d 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -543,7 +543,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict // this copies the dive and makes copies of all the relevant additional data copy_dive(d, &displayed_dive); - if (decoMode() == VPMB) + if (decoMode(false) == VPMB) decoModelParameters->setText(QString("VPM-B +%1").arg(prefs.vpmb_conservatism)); else decoModelParameters->setText(QString("GF %1/%2").arg(prefs.gflow).arg(prefs.gfhigh)); @@ -556,7 +556,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict plannerModel->deleteTemporaryPlan(); return; } - if (decoMode() == VPMB) + if (decoMode(currentState == PLAN) == VPMB) decoModelParameters->setText(QString("VPM-B +%1").arg(diveplan.vpmb_conservatism)); else decoModelParameters->setText(QString("GF %1/%2").arg(diveplan.gflow).arg(diveplan.gfhigh)); @@ -800,7 +800,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict else plotPicturesInternal(d, instant); - toolTipItem->refresh(&displayed_dive, mapToScene(mapFromGlobal(QCursor::pos()))); + toolTipItem->refresh(&displayed_dive, mapToScene(mapFromGlobal(QCursor::pos())), currentState == PLAN); #endif // OK, how long did this take us? Anything above the second is way too long, @@ -1027,7 +1027,7 @@ void ProfileWidget2::scrollViewTo(const QPoint &pos) void ProfileWidget2::mouseMoveEvent(QMouseEvent *event) { QPointF pos = mapToScene(event->pos()); - toolTipItem->refresh(&displayed_dive, mapToScene(mapFromGlobal(QCursor::pos()))); + toolTipItem->refresh(&displayed_dive, mapToScene(mapFromGlobal(QCursor::pos())), currentState == PLAN); if (zoomLevel == 0) { QGraphicsView::mouseMoveEvent(event); |