[QGIS Commit] r14412 - in trunk/qgis/src/core: . raster

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Oct 19 03:29:20 EDT 2010


Author: jef
Date: 2010-10-19 00:29:20 -0700 (Tue, 19 Oct 2010)
New Revision: 14412

Modified:
   trunk/qgis/src/core/qgsmaplayer.cpp
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/src/core/raster/qgsrasterlayer.cpp
Log:
fix #3134

Modified: trunk/qgis/src/core/qgsmaplayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaplayer.cpp	2010-10-19 07:00:30 UTC (rev 14411)
+++ trunk/qgis/src/core/qgsmaplayer.cpp	2010-10-19 07:29:20 UTC (rev 14412)
@@ -186,8 +186,12 @@
   // 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;
 

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2010-10-19 07:00:30 UTC (rev 14411)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2010-10-19 07:29:20 UTC (rev 14412)
@@ -4150,6 +4150,7 @@
   //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();
   }
 }

Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2010-10-19 07:00:30 UTC (rev 14411)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp	2010-10-19 07:29:20 UTC (rev 14412)
@@ -3685,7 +3685,7 @@
   //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 @@
   //if none exists....
   if ( !mCRS->isValid() )
   {
+    mCRS->setValidationHint( tr( "Specify CRS for layer %1" ).arg( name() ) );
     mCRS->validate();
   }
 



More information about the QGIS-commit mailing list