Skip to content
Permalink
Browse files

fix #3134

git-svn-id: http://svn.osgeo.org/qgis/trunk@14412 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Oct 19, 2010
1 parent 7dd52ca commit 6b375425c580e8588469bf56a4182e8cf5f25f46
Showing with 7 additions and 1 deletion.
  1. +4 −0 src/core/qgsmaplayer.cpp
  2. +1 −0 src/core/qgsvectorlayer.cpp
  3. +2 −1 src/core/raster/qgsrasterlayer.cpp
@@ -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;

@@ -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();
}
}
@@ -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() )
@@ -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();
}

0 comments on commit 6b37542

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