Skip to content

Commit

Permalink
[gui] enable deselect feature and create rectangle action only when
Browse files Browse the repository at this point in the history
there is a vector layer in the project (fix #18141, #20333)
  • Loading branch information
alexbruy committed Jan 25, 2019
1 parent 3cb6a40 commit ab3adc6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit ab3adc6

Please sign in to comment.