summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasplin <qt-info@nokia.com>2010-05-13 23:00:19 +0200
committerjasplin <qt-info@nokia.com>2010-05-13 23:00:19 +0200
commita6e46d03766209448e971ee38932ec3db30a1e74 (patch)
tree61bbca63fc47bb63b27b1a0e0a181ddf1a09b9eb
parent2fb17426b78f090af8583c5ca1bf62f72da0bef0 (diff)
Fixed bug.HEADmaster
-rw-r--r--src/bm/resulthistoryinfo.cpp4
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);