Skip to content
Permalink
Browse files
Set layer action states for annotation layers
  • Loading branch information
nyalldawson committed Aug 18, 2021
1 parent 39784f0 commit 13b8d2c9f1502da276b2711002fdef2761bf0349
Showing with 71 additions and 0 deletions.
  1. +71 −0 src/app/qgisapp.cpp
@@ -15650,8 +15650,79 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
break;

case QgsMapLayerType::PluginLayer:
break;

case QgsMapLayerType::AnnotationLayer:
{
mActionLocalHistogramStretch->setEnabled( false );
mActionFullHistogramStretch->setEnabled( false );
mActionLocalCumulativeCutStretch->setEnabled( false );
mActionFullCumulativeCutStretch->setEnabled( false );
mActionIncreaseBrightness->setEnabled( false );
mActionDecreaseBrightness->setEnabled( false );
mActionIncreaseContrast->setEnabled( false );
mActionDecreaseContrast->setEnabled( false );
mActionIncreaseGamma->setEnabled( false );
mActionDecreaseGamma->setEnabled( false );
mActionLayerSubsetString->setEnabled( false );
mActionFeatureAction->setEnabled( false );
mActionSelectFeatures->setEnabled( false );
mActionSelectPolygon->setEnabled( false );
mActionSelectFreehand->setEnabled( false );
mActionSelectRadius->setEnabled( false );
mActionZoomActualSize->setEnabled( false );
mActionZoomToLayer->setEnabled( true );
mActionOpenTable->setEnabled( false );
mMenuFilterTable->setEnabled( false );
mActionOpenTableSelected->setEnabled( false );
mActionOpenTableVisible->setEnabled( false );
mActionOpenTableEdited->setEnabled( false );
mActionSelectAll->setEnabled( false );
mActionReselect->setEnabled( false );
mActionInvertSelection->setEnabled( false );
mActionSelectByExpression->setEnabled( false );
mActionSelectByForm->setEnabled( false );
mActionOpenFieldCalc->setEnabled( false );
mActionSaveLayerEdits->setEnabled( false );
mUndoDock->widget()->setEnabled( false );
mActionSaveLayerDefinition->setEnabled( false );
mActionLayerSaveAs->setEnabled( false );
mActionAddFeature->setEnabled( false );
mActionCircularStringCurvePoint->setEnabled( false );
mActionCircularStringRadius->setEnabled( false );
mActionDeleteSelected->setEnabled( false );
mActionAddRing->setEnabled( false );
mActionFillRing->setEnabled( false );
mActionAddPart->setEnabled( false );
mActionVertexTool->setEnabled( false );
mActionVertexToolActiveLayer->setEnabled( false );
mActionMoveFeature->setEnabled( false );
mActionMoveFeatureCopy->setEnabled( false );
mActionRotateFeature->setEnabled( false );
mActionScaleFeature->setEnabled( false );
mActionOffsetCurve->setEnabled( false );
mActionCopyFeatures->setEnabled( false );
mActionCutFeatures->setEnabled( false );
mActionPasteFeatures->setEnabled( false );
mActionRotatePointSymbols->setEnabled( false );
mActionOffsetPointSymbol->setEnabled( false );
mActionDeletePart->setEnabled( false );
mActionDeleteRing->setEnabled( false );
mActionSimplifyFeature->setEnabled( false );
mActionReshapeFeatures->setEnabled( false );
mActionSplitFeatures->setEnabled( false );
mActionSplitParts->setEnabled( false );
mActionLabeling->setEnabled( false );
mActionDiagramProperties->setEnabled( false );
mActionIdentify->setEnabled( true );
enableDigitizeTechniqueActions( false );
mActionToggleEditing->setEnabled( false );
mActionToggleEditing->setChecked( true ); // always editable
mActionUndo->setEnabled( false );
mActionRedo->setEnabled( false );
updateUndoActions();
break;
}

}

0 comments on commit 13b8d2c

Please sign in to comment.