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 d794c38 commit 587b77e87b425d693e021089c31b5617a03032ec
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 (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 587b77e

Please sign in to comment.