Skip to content

Commit

Permalink
Remove another use of deprecated QgsCoordinateTransform constructor
Browse files Browse the repository at this point in the history
Sponsored by ICSM
  • Loading branch information
nyalldawson committed Mar 21, 2019
1 parent d780d8a commit 696ae5f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/core/qgsvectorlayerdiagramprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,12 @@ bool QgsVectorLayerDiagramProvider::prepare( const QgsRenderContext &context, QS
const QgsMapSettings &mapSettings = mEngine->mapSettings();

if ( context.coordinateTransform().isValid() )
// this is context for layer rendering - use its CT as it includes correct datum transform
// this is context for layer rendering
s2.setCoordinateTransform( context.coordinateTransform() );
else
{
// otherwise fall back to creating our own CT - this one may not have the correct datum transform!
Q_NOWARN_DEPRECATED_PUSH
s2.setCoordinateTransform( QgsCoordinateTransform( mLayerCrs, mapSettings.destinationCrs() ) );
Q_NOWARN_DEPRECATED_POP
// otherwise fall back to creating our own CT
s2.setCoordinateTransform( QgsCoordinateTransform( mLayerCrs, mapSettings.destinationCrs(), context.transformContext() ) );
}

s2.setRenderer( mDiagRenderer );
Expand Down

0 comments on commit 696ae5f

Please sign in to comment.