diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-12-15 14:14:27 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2016-12-16 09:33:47 +0000 |
commit | 9e788f7e9d083be44c91f9949eece4dbca273f29 (patch) | |
tree | f056641ff05f20d60721a45a7bd81bd109d187d1 | |
parent | 4fc6ba92516f0a8f622da2160380a8c1fc5132ee (diff) |
Fix crash when animating axes with polar charts
No need to update the geometry to old geometry for nicer animation,
if there was no old layout.
Change-Id: Ife7685ea7587e412e4471a93dfbda0a357550099
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/charts/axis/polarchartaxis.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/charts/axis/polarchartaxis.cpp b/src/charts/axis/polarchartaxis.cpp index cf900c3c..b37041fb 100644 --- a/src/charts/axis/polarchartaxis.cpp +++ b/src/charts/axis/polarchartaxis.cpp @@ -83,7 +83,8 @@ void PolarChartAxis::updateLayout(QVector<qreal> &layout) // axes lingering in wrong position compared to series plot before animation can kick in. // Note that the position mismatch still exists even with this update, but it will be // far less ugly. - updateGeometry(); + if (ChartAxisElement::layout().size() != 0) + updateGeometry(); } if (diff > 0) |