diff options
author | Keith Kyzivat <keith.kyzivat@qt.io> | 2020-10-13 16:04:14 -0400 |
---|---|---|
committer | Keith Kyzivat <keith.kyzivat@qt.io> | 2020-10-23 15:00:06 +0000 |
commit | 07f28ce1eab983a49e661855ee11ffbd624f0083 (patch) | |
tree | 40cfda27477df48604387402659ff97e20c3e3eb /src/charts/qchart.cpp | |
parent | c082168fba5deb930a01502c54bf2080af53b544 (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>
(cherry picked from commit e71430cd2b82cda52a2886c941b227eb6cdbcb7a)
Diffstat (limited to 'src/charts/qchart.cpp')
-rw-r--r-- | src/charts/qchart.cpp | 1 |
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() { |