Skip to content
Permalink
Browse files

fix #5176

  • Loading branch information
jef-n committed May 21, 2012
1 parent d651892 commit 56353916dfa7e26dd3cb97842c83ff9812169465
Showing with 23 additions and 12 deletions.
  1. +23 −12 src/core/qgscoordinatereferencesystem.cpp
@@ -1078,27 +1078,38 @@ bool QgsCoordinateReferenceSystem::readXML( QDomNode & theNode )
{
bool initialized = false;

QDomNode myNode = srsNode.namedItem( "authid" );
if ( !myNode.isNull() )
{
operator=( QgsCRSCache::instance()->crsByAuthId( myNode.toElement().text() ) );
if ( isValid() )
{
initialized = true;
}
}
long srsid = srsNode.namedItem( "srsid" ).toElement().text().toLong();

if ( !initialized )
QDomNode myNode;

if ( srsid < USER_CRS_START_ID )
{
myNode = srsNode.namedItem( "epsg" );
myNode = srsNode.namedItem( "authid" );
if ( !myNode.isNull() )
{
operator=( QgsCRSCache::instance()->crsByEpsgId( myNode.toElement().text().toLong() ) );
operator=( QgsCRSCache::instance()->crsByAuthId( myNode.toElement().text() ) );
if ( isValid() )
{
initialized = true;
}
}

if ( !initialized )
{
myNode = srsNode.namedItem( "epsg" );
if ( !myNode.isNull() )
{
operator=( QgsCRSCache::instance()->crsByEpsgId( myNode.toElement().text().toLong() ) );
if ( isValid() )
{
initialized = true;
}
}
}
}
else
{
QgsDebugMsg( "Ignoring authid/epsg for user crs." );
}

if ( initialized )

0 comments on commit 5635391

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