[QGIS Commit] r9500 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Oct 20 14:02:52 EDT 2008


Author: ersts
Date: 2008-10-20 14:02:52 -0400 (Mon, 20 Oct 2008)
New Revision: 9500

Modified:
   trunk/qgis/src/app/qgisapp.cpp
Log:
-Re enabled the identify tool for rasters
-The current logic only enabled the identify tool if the raster had a provider with the capability, GDAL datasets do not have a provider per se
-Note the current logic for enabling the identify tool (and other tools?) needs to be re evaluated, as it is done when the layer is loaded not when it is activated/selected

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2008-10-20 12:23:58 UTC (rev 9499)
+++ trunk/qgis/src/app/qgisapp.cpp	2008-10-20 18:02:52 UTC (rev 9500)
@@ -5220,6 +5220,12 @@
     mActionCutFeatures->setEnabled( false );
     mActionPasteFeatures->setEnabled( false );
 
+    //NOTE: This check does not really add any protection, as it is called on load not on layer select/activate
+    //If you load a layer with a provider and idenitfy ability then load another without, the tool would be disabled for both
+    
+    //Enable the Identify tool ( GDAL datasets draw without a provider )
+    //but turn off if data provider exists and has no Identify capabilities
+    mActionIdentify->setEnabled( true );
     const QgsRasterLayer* vlayer = dynamic_cast<const QgsRasterLayer*>( layer );
     const QgsRasterDataProvider* dprovider = vlayer->dataProvider();
     if ( dprovider )



More information about the QGIS-commit mailing list