diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2021-08-24 12:22:45 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-31 11:05:16 +0000 |
commit | dd73e619e156a0681623419a65509fe2265a0ead (patch) | |
tree | 14f65646edd1ad9e164b250899a1264140880a46 /src | |
parent | c134d19585b5ec3e1cd241a9ba051d8f73ccb550 (diff) | |
download | qtlocation-dd73e619e156a0681623419a65509fe2265a0ead.tar.gz |
CoordinateAnimation: fix direction interpolation
The interpolation for the West and East directions were actually
confused. When the CoordinateAnimaion.East direction was selected, the
interpolation was done in West direction and vice versa.
This patch fixes the issue.
[ChangeLog][CoordinateAnimation][Important Behavior Change] The value
of direction property for CoordinateAnimation is now handled correctly.
Previously the values were confused, so specifying
CoordinateAnimation.East direction was actually leading to moving West
and vice versa.
Change-Id: I8e73fc4ad5cabd80bca38c624c70919e54c55127
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
(cherry picked from commit 965c80c5db88dd94b666228d432b226c496c9d30)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/positioningquick/qquickgeocoordinateanimation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/positioningquick/qquickgeocoordinateanimation.cpp b/src/positioningquick/qquickgeocoordinateanimation.cpp index a678c340..b5d1286c 100644 --- a/src/positioningquick/qquickgeocoordinateanimation.cpp +++ b/src/positioningquick/qquickgeocoordinateanimation.cpp @@ -121,7 +121,7 @@ QVariant q_coordinateShortestInterpolator(const QGeoCoordinate &from, const QGeo return QVariant::fromValue(result); } -QVariant q_coordinateWestInterpolator(const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress) +QVariant q_coordinateEastInterpolator(const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress) { const QGeoMercatorCoordinatePrivate* fromMercator = static_cast<const QGeoMercatorCoordinatePrivate*>(QGeoCoordinatePrivate::get(&from)); @@ -151,7 +151,7 @@ QVariant q_coordinateWestInterpolator(const QGeoCoordinate &from, const QGeoCoor return QVariant::fromValue(result); } -QVariant q_coordinateEastInterpolator(const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress) +QVariant q_coordinateWestInterpolator(const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress) { const QGeoMercatorCoordinatePrivate* fromMercator = static_cast<const QGeoMercatorCoordinatePrivate*>(QGeoCoordinatePrivate::get(&from)); |