Skip to content
Permalink
Browse files

deactivate "circular string.." buttons for layer without geom

  • Loading branch information
tudorbarascu authored and nyalldawson committed Jan 9, 2017
1 parent e433639 commit 313ec55640adf3696d8b7554cc6d9b7fc319c2df
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/qgisapp.cpp
@@ -10825,8 +10825,10 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
mActionPasteFeatures->setEnabled( isEditable && canAddFeatures && !clipboard()->isEmpty() );

mActionAddFeature->setEnabled( isEditable && canAddFeatures );
mActionCircularStringCurvePoint->setEnabled( isEditable && isSpatial && ( canAddFeatures || canChangeGeometry ) && vlayer->geometryType() != QgsWkbTypes::PointGeometry );
mActionCircularStringRadius->setEnabled( isEditable && isSpatial && ( canAddFeatures || canChangeGeometry ) );
mActionCircularStringCurvePoint->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionCircularStringRadius->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );

//does provider allow deleting of features?
mActionDeleteSelected->setEnabled( isEditable && canDeleteFeatures && layerHasSelection );

0 comments on commit 313ec55

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