mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix bug in logic expression
Yes, the old code made perfect sense when you read it - except the C++ compiler turned it into something quite different from what was intended. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d49acdb3c0
commit
2bd2df0349
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue