mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Avoid second transform of extent (in QgsMapRender) on change of dest CRS
This commit is contained in:
parent
97665d7452
commit
0f5d7438e3
@ -221,7 +221,7 @@ class QgsMapRenderer : QObject
|
||||
bool hasCrsTransformEnabled() const;
|
||||
|
||||
//! sets destination coordinate reference system
|
||||
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool refreshCoordinateTransformInfo = true );
|
||||
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool refreshCoordinateTransformInfo = true, bool transformExtent = true );
|
||||
|
||||
//! returns CRS of destination coordinate reference system
|
||||
const QgsCoordinateReferenceSystem& destinationCrs() const;
|
||||
|
@ -657,7 +657,7 @@ bool QgsMapRenderer::hasCrsTransformEnabled() const
|
||||
return mProjectionsEnabled;
|
||||
}
|
||||
|
||||
void QgsMapRenderer::setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool refreshCoordinateTransformInfo )
|
||||
void QgsMapRenderer::setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool refreshCoordinateTransformInfo, bool transformExtent )
|
||||
{
|
||||
QgsDebugMsg( "* Setting destCRS : = " + crs.toProj4() );
|
||||
QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( crs.srsid() ) );
|
||||
@ -668,7 +668,7 @@ void QgsMapRenderer::setDestinationCrs( const QgsCoordinateReferenceSystem& crs,
|
||||
mLayerCoordinateTransformInfo.clear();
|
||||
}
|
||||
QgsRectangle rect;
|
||||
if ( !mExtent.isEmpty() )
|
||||
if ( transformExtent && !mExtent.isEmpty() )
|
||||
{
|
||||
QgsCoordinateTransform transform( *mDestCRS, crs );
|
||||
rect = transform.transformBoundingBox( mExtent );
|
||||
|
@ -258,7 +258,7 @@ class CORE_EXPORT QgsMapRenderer : public QObject
|
||||
bool hasCrsTransformEnabled() const;
|
||||
|
||||
//! sets destination coordinate reference system
|
||||
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool refreshCoordinateTransformInfo = true );
|
||||
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs, bool refreshCoordinateTransformInfo = true, bool transformExtent = true );
|
||||
|
||||
//! returns CRS of destination coordinate reference system
|
||||
const QgsCoordinateReferenceSystem& destinationCrs() const;
|
||||
|
@ -152,7 +152,7 @@ void QgsMapCanvasRendererSync::onCrsTransformR2C()
|
||||
|
||||
void QgsMapCanvasRendererSync::onDestCrsC2R()
|
||||
{
|
||||
mRenderer->setDestinationCrs( mCanvas->mapSettings().destinationCrs() );
|
||||
mRenderer->setDestinationCrs( mCanvas->mapSettings().destinationCrs(), true, false );
|
||||
}
|
||||
|
||||
void QgsMapCanvasRendererSync::onDestCrsR2C()
|
||||
|
Loading…
x
Reference in New Issue
Block a user