Skip to content
Permalink
Browse files

fix for #842

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7702 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Dec 1, 2007
1 parent af5f888 commit 79cae57836caec85353236e600635b6a8707559c
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/app/qgisapp.cpp
@@ -4732,7 +4732,7 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
{
mActionToggleEditing->setEnabled(true);
mActionToggleEditing->setChecked(vlayer->isEditable());
mActionEditPaste->setEnabled(true);
mActionEditPaste->setEnabled(vlayer->isEditable());
}
else
{
@@ -4741,7 +4741,7 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
}

//does provider allow deleting of features?
if(dprovider->capabilities() & QgsVectorDataProvider::DeleteFeatures)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::DeleteFeatures)
{
mActionDeleteSelected->setEnabled(true);
mActionEditCut->setEnabled(true);
@@ -4755,7 +4755,7 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)

if(vlayer->vectorType() == QGis::Point)
{
if(dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
{
mActionCapturePoint->setEnabled(true);
}
@@ -4777,7 +4777,7 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
}
else if(vlayer->vectorType() == QGis::Line)
{
if(dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
{
mActionCaptureLine->setEnabled(true);
}
@@ -4792,7 +4792,7 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
}
else if(vlayer->vectorType() == QGis::Polygon)
{
if(dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
{
mActionCapturePolygon->setEnabled(true);
}
@@ -4805,7 +4805,7 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
}

//are add/delete/move vertex supported?
if(dprovider->capabilities() & QgsVectorDataProvider::ChangeGeometries)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::ChangeGeometries)
{
mActionAddVertex->setEnabled(true);
mActionMoveVertex->setEnabled(true);

0 comments on commit 79cae57

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