Skip to content
Permalink
Browse files

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

  • Loading branch information
tudorbarascu committed Jan 10, 2017
1 parent ea3fa8d commit 22a9d9a45d5d08d2423cc8782939da80a6f4e8ed
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/app/qgisapp.cpp
@@ -10639,8 +10639,11 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
mActionPasteFeatures->setEnabled( isEditable && canAddFeatures && !clipboard()->isEmpty() );

mActionAddFeature->setEnabled( isEditable && canAddFeatures );
mActionCircularStringCurvePoint->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry ) && vlayer->geometryType() != QGis::Point );
mActionCircularStringRadius->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry ) );
mActionCircularStringCurvePoint->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QGis::Line || vlayer->geometryType() == QGis::Polygon ) );
mActionCircularStringRadius->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QGis::Line || vlayer->geometryType() == QGis::Polygon ) );


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

0 comments on commit 22a9d9a

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