Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 45dc105
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/core/qgsmaprenderer.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 45dc105

Please sign in to comment.