Skip to content
Permalink
Browse files

An enhanced fix for the r5084 fix that was a fix for r5080.

Yes, there needed to be a check for the returned value of the data provider (not so much the QgsMapLayer) - this has been adjusted.  The same check is now also applied to the processing of vector layers - after all that's where I copy/pasted the code from.



git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5098 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
morb_au
morb_au committed Mar 24, 2006
1 parent da982f0 commit da61dd25abe70c4549b2ff0c183986cf99be327b
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/gui/qgisapp.cpp
@@ -4867,7 +4867,8 @@ void QgisApp::activateDeactivateLayerRelatedActions(const QgsMapLayer* layer)

const QgsVectorLayer* vlayer = dynamic_cast<const QgsVectorLayer*>(layer);
const QgsVectorDataProvider* dprovider = vlayer->getDataProvider();
if(vlayer)

if (dprovider)
{
//does provider allow deleting of features?
if(dprovider->capabilities() & QgsVectorDataProvider::DeleteFeatures)
@@ -4954,11 +4955,11 @@ void QgisApp::activateDeactivateLayerRelatedActions(const QgsMapLayer* layer)
mActionMoveVertex->setEnabled(false);

const QgsRasterLayer* vlayer = dynamic_cast<const QgsRasterLayer*> (layer);
if (vlayer)
const QgsRasterDataProvider* dprovider = vlayer->getDataProvider();
if (dprovider)
{
const QgsRasterDataProvider* dprovider = vlayer->getDataProvider();
// does provider allow the identify map tool?
if ( dprovider && (dprovider->capabilities() & QgsRasterDataProvider::Identify))
if (dprovider->capabilities() & QgsRasterDataProvider::Identify)
{
mActionIdentify->setEnabled(TRUE);
}

0 comments on commit da61dd2

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