Skip to content
Permalink
Browse files

QgsMapRenderer: Load projection flag and destination CRS before exten…

…t. Fixes ticket #5605
  • Loading branch information
mhugent authored and jef-n committed May 21, 2012
1 parent 8b86d83 commit 45dc1051136e2cedb930944105363335a2106865
Showing with 10 additions and 12 deletions.
  1. +10 −12 src/core/qgsmaprenderer.cpp
@@ -997,6 +997,16 @@ bool QgsMapRenderer::readXML( QDomNode & theNode )
}
setMapUnits( units );

// set projections flag
QDomNode projNode = theNode.namedItem( "projections" );
element = projNode.toElement();
setProjectionsEnabled( element.text().toInt() );

// set destination CRS
QgsCoordinateReferenceSystem srs;
QDomNode srsNode = theNode.namedItem( "destinationsrs" );
srs.readXML( srsNode );
setDestinationCrs( srs );

// set extent
QgsRectangle aoi;
@@ -1024,18 +1034,6 @@ bool QgsMapRenderer::readXML( QDomNode & theNode )
aoi.setYMaximum( ymax );

setExtent( aoi );

// set projections flag
QDomNode projNode = theNode.namedItem( "projections" );
element = projNode.toElement();
setProjectionsEnabled( element.text().toInt() );

// set destination CRS
QgsCoordinateReferenceSystem srs;
QDomNode srsNode = theNode.namedItem( "destinationsrs" );
srs.readXML( srsNode );
setDestinationCrs( srs );

return true;
}

0 comments on commit 45dc105

Please sign in to comment.
You can’t perform that action at this time.