##// END OF EJS Templates
Fix QValueAxis range setting...
Titta Heikkala -
r2699:9a409f001e2a
parent child
Show More
@@ -367,13 +367,25 void QValueAxisPrivate::setRange(qreal min, qreal max)
367 if (min > max)
367 if (min > max)
368 return;
368 return;
369
369
370 if (!qFuzzyCompare(m_min,min)) {
370 bool changeMin = false;
371 if (m_min == 0 || min == 0)
372 changeMin = !qFuzzyCompare(1 + m_min, 1 + min);
373 else
374 changeMin = !qFuzzyCompare(m_min, min);
375
376 bool changeMax = false;
377 if (m_max == 0 || max == 0)
378 changeMax = !qFuzzyCompare(1 + m_max, 1 + max);
379 else
380 changeMax = !qFuzzyCompare(m_max, max);
381
382 if (changeMin) {
371 m_min = min;
383 m_min = min;
372 changed = true;
384 changed = true;
373 emit q->minChanged(min);
385 emit q->minChanged(min);
374 }
386 }
375
387
376 if (!qFuzzyCompare(m_max,max)) {
388 if (changeMax) {
377 m_max = max;
389 m_max = max;
378 changed = true;
390 changed = true;
379 emit q->maxChanged(max);
391 emit q->maxChanged(max);
General Comments 0
You need to be logged in to leave comments. Login now