Skip to content
Permalink
Browse files

Merge pull request #3961 from tudorbarascu/addcircularfix

 deactivate "add circular string.." buttons for layer without geom
  • Loading branch information
nyalldawson committed Jan 11, 2017
2 parents ea3fa8d + 22a9d9a commit bc3ca5a45a29402392f132e619a72855054f54f9
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 bc3ca5a

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