diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-12-02 12:10:42 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-12-02 10:26:23 +0000 |
commit | 0f2552ffd5edc2998306362719d50c4cd6d474e9 (patch) | |
tree | 0ac414c8f537c1a6bb836c6f3f7013246b2d6749 /src/charts/axis/polarchartaxisradial.cpp | |
parent | 2c3935a76fbadd5714882795f39ce59049aafb63 (diff) |
Fix crash when log axis range is initialized to contain no ticks
Axis updateGeometry() expects there to always be at least one arrow
item for the main axis arrow, but the arrow never got created if
there were no ticks on the axis before axis was shown. Ensure that
createItems() is called at least once for axis even if there are no
ticks.
Task-number: QTBUG-57328
Change-Id: I7847e2f0d4ee1c3e4546dca05df6078b4a4e81c8
Reviewed-by: Mika Salmela <mika.salmela@qt.io>
Reviewed-by: Alexander Mishin <apmishin@yandex.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/charts/axis/polarchartaxisradial.cpp')
-rw-r--r-- | src/charts/axis/polarchartaxisradial.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/charts/axis/polarchartaxisradial.cpp b/src/charts/axis/polarchartaxisradial.cpp index c20fcb47..f746c038 100644 --- a/src/charts/axis/polarchartaxisradial.cpp +++ b/src/charts/axis/polarchartaxisradial.cpp @@ -49,7 +49,7 @@ PolarChartAxisRadial::~PolarChartAxisRadial() void PolarChartAxisRadial::updateGeometry() { const QVector<qreal> &layout = this->layout(); - if (layout.isEmpty()) + if (layout.isEmpty() && axis()->type() != QAbstractAxis::AxisTypeLogValue) return; createAxisLabels(layout); |