diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-04-10 13:24:09 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-04-11 12:15:19 +0000 |
commit | 1fd6226d52b8d3d201b117902ff1ecd84cc1a1e5 (patch) | |
tree | a11c18667c02747c24fcf8d68a14224e91182a67 | |
parent | 1787f95f5727a20a4f0871736ad987fcfdf0f3c6 (diff) |
Fix rotate animation freezing in wrong positionv5.11.0-beta4
In QSvgAnimateTransform::resolveMatrix(), the indexes into the vals
array were previously calculated to be 1,1 in the final step, where
currentPosition=1, by using qCeil()/qFloor(), resulting in rotationDiff=0
and the rotation snapping back.
Fix by setting startElem to endElem - 1 when available.
Task-number: QTBUG-67525
Change-Id: Ie1d7e8be6ea8dd9aa155ee8c479037bc269f6df7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
-rw-r--r-- | src/svg/qsvgstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index ae714d7..5448797 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -694,8 +694,8 @@ void QSvgAnimateTransform::resolveMatrix(const QSvgNode *node) } qreal currentPosition = percentOfAnimation * (m_count - 1); - int startElem = qFloor(currentPosition); int endElem = qCeil(currentPosition); + int startElem = qMax(endElem - 1, 0); switch(m_type) { |