Skip to content

Commit

Permalink
Merge pull request #3961 from tudorbarascu/addcircularfix
Browse files Browse the repository at this point in the history
 deactivate "add circular string.." buttons for layer without geom
  • Loading branch information
nyalldawson authored Jan 11, 2017
2 parents ea3fa8d + 22a9d9a commit bc3ca5a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit bc3ca5a

Please sign in to comment.