@@ -29,7 +29,7 | |||||
29 | #include <private/chartdataset_p.h> |
|
29 | #include <private/chartdataset_p.h> | |
30 | #include <private/chartpresenter_p.h> |
|
30 | #include <private/chartpresenter_p.h> | |
31 | #include <private/charttheme_p.h> |
|
31 | #include <private/charttheme_p.h> | |
32 |
|
32 | #include <private/charthelpers_p.h> | ||
33 |
|
33 | |||
34 | QT_CHARTS_BEGIN_NAMESPACE |
|
34 | QT_CHARTS_BEGIN_NAMESPACE | |
35 | /*! |
|
35 | /*! | |
@@ -382,6 +382,12 void QValueAxisPrivate::setRange(qreal min, qreal max) | |||||
382 | if (min > max) |
|
382 | if (min > max) | |
383 | return; |
|
383 | return; | |
384 |
|
384 | |||
|
385 | if (!isValidValue(min, max)) { | |||
|
386 | qWarning() << "Attempting to set invalid range for value axis: [" | |||
|
387 | << min << " - " << max << "]"; | |||
|
388 | return; | |||
|
389 | } | |||
|
390 | ||||
385 | bool changeMin = false; |
|
391 | bool changeMin = false; | |
386 | if (m_min == 0 || min == 0) |
|
392 | if (m_min == 0 || min == 0) | |
387 | changeMin = !qFuzzyCompare(1 + m_min, 1 + min); |
|
393 | changeMin = !qFuzzyCompare(1 + m_min, 1 + min); |
General Comments 0
You need to be logged in to leave comments.
Login now