aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index 143b0f90c..9a4966fef 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -190,7 +190,7 @@ void DiveCartesianAxis::setTickInterval(double i)
qreal DiveCartesianAxis::valueAt(const QPointF& p)
{
QLineF m = line();
- double retValue = orientation == LeftToRight || RightToLeft?
+ double retValue = (orientation == LeftToRight || orientation == RightToLeft) ?
max * (p.x() - m.x1()) / (m.x2() - m.x1()) :
max * (p.y() - m.y1()) / (m.y2() - m.y1());
return retValue;