Skip to content

Commit

Permalink
deactivate "circular string.." buttons for layer without geom
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorbarascu authored and nyalldawson committed Jan 11, 2017
1 parent a87d2b9 commit 586b99a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -10026,8 +10026,11 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
mActionPasteFeatures->setEnabled( isEditable && canAddFeatures && !clipboard()->empty() );

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 586b99a

Please sign in to comment.