Skip to content
Permalink
Browse files
fix for bug #925 'Add Island' and 'Add Ring' not greyed-out when leav…
…ing edit mode

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8097 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 30, 2008
1 parent 19c35e3 commit 616197b8f8a9ee6dd90572241089a3e3d1177665
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/app/qgisapp.cpp
@@ -4809,17 +4809,20 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
{
mActionCapturePoint->setEnabled(true);
mActionMoveFeature->setEnabled(true);
}
else
{
mActionCapturePoint->setEnabled(false);
mActionMoveFeature->setEnabled(false);
}
mActionCaptureLine->setEnabled(false);
mActionCapturePolygon->setEnabled(false);
mActionAddVertex->setEnabled(false);
mActionDeleteVertex->setEnabled(false);
mActionAddRing->setEnabled(false);
mActionAddIsland->setEnabled(false);
mActionSplitFeatures->setEnabled(false);
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::ChangeGeometries)
{
mActionMoveVertex->setEnabled(true);
@@ -4832,10 +4835,14 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
{
mActionCaptureLine->setEnabled(true);
mActionSplitFeatures->setEnabled(true);
mActionMoveFeature->setEnabled(true);
}
else
{
mActionCaptureLine->setEnabled(false);
mActionSplitFeatures->setEnabled(false);
mActionMoveFeature->setEnabled(false);
}
mActionCapturePoint->setEnabled(false);
mActionCapturePolygon->setEnabled(false);
@@ -4847,10 +4854,18 @@ void QgisApp::activateDeactivateLayerRelatedActions(QgsMapLayer* layer)
if(vlayer->isEditable() && dprovider->capabilities() & QgsVectorDataProvider::AddFeatures)
{
mActionCapturePolygon->setEnabled(true);
mActionAddRing->setEnabled(true);
mActionAddIsland->setEnabled(true);
mActionSplitFeatures->setEnabled(true);
mActionMoveFeature->setEnabled(true);
}
else
{
mActionCapturePolygon->setEnabled(false);
mActionAddRing->setEnabled(false);
mActionAddIsland->setEnabled(false);
mActionSplitFeatures->setEnabled(false);
mActionMoveFeature->setEnabled(false);
}
mActionCapturePoint->setEnabled(false);
mActionCaptureLine->setEnabled(false);

0 comments on commit 616197b

Please sign in to comment.