Skip to content

Commit

Permalink
fix invalid use of rendering cache when map rotation is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik authored and nyalldawson committed Feb 9, 2021
1 parent 645397e commit c6dcea7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsmaprenderercache.cpp
Expand Up @@ -235,6 +235,11 @@ QImage QgsMapRendererCache::transformedCacheImage( const QString &cacheKey, cons
}
else
{
// no not use cache when the canvas rotation just changed
// https://github.com/qgis/QGIS/issues/41360
if ( !qgsDoubleNear( mtp.mapRotation(), params.cachedMtp.mapRotation() ) )
return QImage();

QgsRectangle intersection = mExtent.intersect( params.cachedExtent );
if ( intersection.isNull() )
return QImage();
Expand Down

0 comments on commit c6dcea7

Please sign in to comment.