Skip to content
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: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
morb_au committed Mar 24, 2006
1 parent da982f0 commit da61dd25abe70c4549b2ff0c183986cf99be327b
Showing 1 changed file with 5 additions and 4 deletions.
@@ -4867,7 +4867,8 @@ void QgisApp::activateDeactivateLayerRelatedActions(const QgsMapLayer* layer)

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

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

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)

0 comments on commit da61dd2

Please sign in to comment.