Skip to content

Commit

Permalink
fix #3134
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14412 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 19, 2010
1 parent 7dd52ca commit 6b37542
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 6b37542

Please sign in to comment.