Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix #3134
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14412 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 19, 2010
1 parent 36215e7 commit 4965050
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -186,8 +186,12 @@ bool QgsMapLayer::readXML( QDomNode & layer_node )
// Make it the saved CRS to have WMS layer projected correctly.
// We will still overwrite whatever GDAL etc picks up anyway
// further down this function.
mnl = layer_node.namedItem( "layername" );
mne = mnl.toElement();

QDomNode srsNode = layer_node.namedItem( "srs" );
mCRS->readXML( srsNode );
mCRS->setValidationHint( tr( "Specify CRS for layer %1" ).arg( mne.text() ) );
mCRS->validate();
savedCRS = *mCRS;

Expand Down
1 change: 1 addition & 0 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -4150,6 +4150,7 @@ void QgsVectorLayer::setCoordinateSystem()
//we only nee to do that if the srs is not alreay valid
if ( !mCRS->isValid() )
{
mCRS->setValidationHint( tr( "Specify CRS for layer %1" ).arg( name() ) );
mCRS->validate();
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -3685,7 +3685,7 @@ void QgsRasterLayer::thumbnailAsImage( QImage * thepImage )
//TODO: This should be depreciated and a new function written that just returns a new QImage, it will be safer
if ( 0 == thepImage ) { return; }

thepImage->fill(Qt::white); //defaults to white
thepImage->fill( Qt::white ); //defaults to white

// Raster providers are disabled (for the moment)
if ( mProviderKey.isEmpty() )
Expand Down Expand Up @@ -5367,6 +5367,7 @@ bool QgsRasterLayer::readFile( QString const &theFilename )
//if none exists....
if ( !mCRS->isValid() )
{
mCRS->setValidationHint( tr( "Specify CRS for layer %1" ).arg( name() ) );
mCRS->validate();
}

Expand Down

0 comments on commit 4965050

Please sign in to comment.