diff options
-rw-r--r-- | src/bm/resulthistoryinfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bm/resulthistoryinfo.cpp b/src/bm/resulthistoryinfo.cpp index 1b5d931..4707b92 100644 --- a/src/bm/resulthistoryinfo.cpp +++ b/src/bm/resulthistoryinfo.cpp @@ -213,6 +213,7 @@ void ResultHistoryInfo::computeStabilityStats( int seqSize = 0; bool insideRangePrev = false; + bool firstInsideRangeSeen = false; int smoothFromPos = -1; findSmoothPos(fromTimestamp, &smoothFromPos); @@ -231,9 +232,10 @@ void ResultHistoryInfo::computeStabilityStats( *zerosFound = true; const qreal val = values.at(i); - if (firstInsideRange) { + if (firstInsideRange && (!firstInsideRangeSeen)) { *minLevel = *maxLevel = val; *maxMinFound = true; + firstInsideRangeSeen = true; } else if (insideRange) { *minLevel = qMin(*minLevel, val); *maxLevel = qMax(*maxLevel, val); |