Skip to content
Permalink
Browse files

[gui] enable deselect feature and create rectangle action only when

there is a vector layer in the project (fix #18141, #20333)
  • Loading branch information
alexbruy committed Jan 25, 2019
1 parent 3cb6a40 commit ab3adc663c37b3da589cf6bae56d733fcbc4feb3
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/app/qgisapp.cpp
@@ -12481,6 +12481,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionLabeling->setEnabled( false );
mActionOpenTable->setEnabled( false );
mActionSelectAll->setEnabled( false );
mActionDeselectAll->setEnabled( false );
mActionInvertSelection->setEnabled( false );
mActionOpenFieldCalc->setEnabled( false );
mActionToggleEditing->setEnabled( false );
@@ -12506,6 +12507,8 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionEllipseFoci->setEnabled( false );
mActionRectangleCenterPoint->setEnabled( false );
mActionRectangleExtent->setEnabled( false );
mActionRectangle3PointsDistance->setEnabled( false );
mActionRectangle3PointsProjected->setEnabled( false );
mActionRegularPolygon2Points->setEnabled( false );
mActionRegularPolygonCenterPoint->setEnabled( false );
mActionRegularPolygonCenterCorner->setEnabled( false );
@@ -12611,6 +12614,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionSelectByForm->setEnabled( true );
mActionOpenTable->setEnabled( true );
mActionSelectAll->setEnabled( true );
mActionDeselectAll->setEnabled( true );
mActionInvertSelection->setEnabled( true );
mActionSaveLayerDefinition->setEnabled( true );
mActionLayerSaveAs->setEnabled( true );
@@ -12839,6 +12843,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomToSelected->setEnabled( false );
mActionOpenTable->setEnabled( false );
mActionSelectAll->setEnabled( false );
mActionDeselectAll->setEnabled( false );
mActionInvertSelection->setEnabled( false );
mActionSelectByExpression->setEnabled( false );
mActionSelectByForm->setEnabled( false );

0 comments on commit ab3adc6

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