Skip to content
Permalink
Browse files
QgsMapRenderer: Load projection flag and destination CRS before exten…
…t. Fixes ticket #5605
  • Loading branch information
mhugent committed May 17, 2012
1 parent bfd846a commit 783b67f1baf2a6de2e709499f7698966ce22e50f
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 783b67f

Please sign in to comment.