summaryrefslogtreecommitdiffstats
path: root/src/charts/qchart.cpp
diff options
context:
space:
mode:
authorKeith Kyzivat <keith.kyzivat@qt.io>2020-10-13 16:04:14 -0400
committerKeith Kyzivat <keith.kyzivat@qt.io>2020-10-22 10:49:02 -0400
commite71430cd2b82cda52a2886c941b227eb6cdbcb7a (patch)
tree24d820861729b743e2392cc121d016c729a40d8f /src/charts/qchart.cpp
parent652be0f1be29a482fc2fe82614a3ba922e136803 (diff)
Prevent zoom-out beyond infinite linear max double values
When zooming out domains that include log axes, prevent zoom-out when the new zoom level would result in a max value that is above the upper range of double (represented as inf). Additionally, prevent zoom-out when the log value exceeds the number of pixels in the log axis dimension. Major gridlines are created at each integral log value, and it does not make sense to zoom out beyond such point. Task-number: QTBUG-75500 Change-Id: Icab72f600a84297d43da675c5757f6e63ae25119 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/charts/qchart.cpp')
-rw-r--r--src/charts/qchart.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/charts/qchart.cpp b/src/charts/qchart.cpp
index 703e6625..743fea6d 100644
--- a/src/charts/qchart.cpp
+++ b/src/charts/qchart.cpp
@@ -414,6 +414,7 @@ void QChart::zoomIn(const QRectF &rect)
/*!
Zooms out of the view by a factor of two.
+ \note This will do nothing if the result would contain an invalid logarithmic axis range.
*/
void QChart::zoomOut()
{