Skip to content
Permalink
Browse files
-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

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9500 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed Oct 20, 2008
1 parent 0dc560b commit 08fb6352b7260079fe353c7eca9ba2303b8db8a7
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgisapp.cpp
@@ -5220,6 +5220,12 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
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 )

0 comments on commit 08fb635

Please sign in to comment.