Skip to content

Commit

Permalink
Fix "Shadow" Tmp-Exhaustion Marker
Browse files Browse the repository at this point in the history
... which appears only when plot is "zoomed in"
  • Loading branch information
Joern-R committed Apr 19, 2017
1 parent da88a60 commit 2911d64
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Charts/AllPlot.cpp
Expand Up @@ -7387,11 +7387,12 @@ AllPlot::plotTmpExhaustion(double mx)
// we need to have a ride to work with
if (!rideItem || !rideItem->ride()) return;

double px = invTransform(QwtAxisId(QwtPlot::xBottom), mx);
double secs = -1;

if (bydist == true) secs = rideItem->ride()->distanceToTime(px);
else secs = px * 60.00f;
if (mx > 0) {
double px = invTransform(QwtAxisId(QwtPlot::xBottom), mx);
if (bydist == true) secs = rideItem->ride()->distanceToTime(px);
else secs = px * 60.00f;
}

//
// clear whatever is there
Expand Down

0 comments on commit 2911d64

Please sign in to comment.