Navigation Menu

Skip to content

Commit

Permalink
-Re enabled the identify tool for rasters
Browse files Browse the repository at this point in the history
-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@9500 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed Oct 20, 2008
1 parent f439028 commit 4a91668
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit 4a91668

Please sign in to comment.