Skip to content
Permalink
Browse files

Organize Edit and View menu items

  • Loading branch information
uclaros authored and nirvn committed Jan 4, 2021
1 parent 472b950 commit d30a806ab6a7b07b1ecbac5142ac3896c993062a
Showing with 53 additions and 36 deletions.
  1. +2 −2 src/app/qgisapp.cpp
  2. +51 −34 src/ui/qgisapp.ui

if ( !layer )
{
menuSelect->setEnabled( false );
mMenuSelect->setEnabled( false );
mActionSelectFeatures->setEnabled( false );
mActionSelectPolygon->setEnabled( false );
mActionSelectFreehand->setEnabled( false );
return;
}

menuSelect->setEnabled( true );
mMenuSelect->setEnabled( true );

mActionLayerProperties->setEnabled( QgsProject::instance()->layerIsEmbedded( layer->id() ).isEmpty() );
mActionAddToOverview->setEnabled( true );
@@ -91,15 +91,15 @@
<property name="title">
<string>&amp;View</string>
</property>
<widget class="QMenu" name="menuMeasure">
<widget class="QMenu" name="mMenuMeasure">
<property name="title">
<string>Measure</string>
</property>
<addaction name="mActionMeasure"/>
<addaction name="mActionMeasureArea"/>
<addaction name="mActionMeasureAngle"/>
</widget>
<widget class="QMenu" name="menuDecorations">
<widget class="QMenu" name="mMenuDecorations">
<property name="title">
<string>&amp;Decorations</string>
</property>
@@ -122,6 +122,18 @@
<addaction name="mActionPreviewDeuteranope"/>
<addaction name="mActionPreviewTritanope"/>
</widget>
<widget class="QMenu" name="mMenuLayerVisibility">
<property name="title">
<string>Layer visibility</string>
</property>
<addaction name="mActionShowAllLayers"/>
<addaction name="mActionHideAllLayers"/>
<addaction name="mActionShowSelectedLayers"/>
<addaction name="mActionHideSelectedLayers"/>
<addaction name="mActionToggleSelectedLayers"/>
<addaction name="mActionToggleSelectedLayersIndependently"/>
<addaction name="mActionHideDeselectedLayers"/>
</widget>
<addaction name="mActionNewMapCanvas"/>
<addaction name="mActionNew3DMapCanvas"/>
<addaction name="mActionPan"/>
@@ -130,7 +142,7 @@
<addaction name="mActionZoomOut"/>
<addaction name="separator"/>
<addaction name="mActionIdentify"/>
<addaction name="menuMeasure"/>
<addaction name="mMenuMeasure"/>
<addaction name="mActionStatisticalSummary"/>
<addaction name="separator"/>
<addaction name="mActionZoomFullExtent"/>
@@ -140,22 +152,15 @@
<addaction name="mActionZoomLast"/>
<addaction name="mActionZoomNext"/>
<addaction name="separator"/>
<addaction name="menuDecorations"/>
<addaction name="mMenuDecorations"/>
<addaction name="mMenuPreviewMode"/>
<addaction name="mActionMapTips"/>
<addaction name="mActionNewBookmark"/>
<addaction name="mActionShowBookmarks"/>
<addaction name="mActionShowBookmarkManager"/>
<addaction name="mActionDraw"/>
<addaction name="separator"/>
<addaction name="mActionShowAllLayers"/>
<addaction name="mActionHideAllLayers"/>
<addaction name="mActionShowSelectedLayers"/>
<addaction name="mActionHideSelectedLayers"/>
<addaction name="mActionToggleSelectedLayers"/>
<addaction name="mActionToggleSelectedLayersIndependently"/>
<addaction name="mActionHideDeselectedLayers"/>
<addaction name="separator"/>
<addaction name="mMenuLayerVisibility"/>
</widget>
<widget class="QMenu" name="mLayerMenu">
<property name="title">
@@ -288,7 +293,7 @@
<property name="title">
<string>&amp;Edit</string>
</property>
<widget class="QMenu" name="menuSelect">
<widget class="QMenu" name="mMenuSelect">
<property name="title">
<string>Select</string>
</property>
@@ -356,14 +361,44 @@
<addaction name="mActionHtmlAnnotation"/>
<addaction name="mActionSvgAnnotation"/>
</widget>
<widget class="QMenu" name="mMenuEditAttributes">
<property name="title">
<string>Edit Attributes</string>
</property>
<addaction name="mActionMultiEditAttributes"/>
<addaction name="mActionMergeFeatureAttributes"/>
</widget>
<widget class="QMenu" name="mMenuEditGeometry">
<property name="title">
<string>Edit Geometry</string>
</property>
<addaction name="mActionMoveFeature"/>
<addaction name="mActionMoveFeatureCopy"/>
<addaction name="mActionRotateFeature"/>
<addaction name="mActionSimplifyFeature"/>
<addaction name="mActionAddRing"/>
<addaction name="mActionAddPart"/>
<addaction name="mActionFillRing"/>
<addaction name="mActionDeleteRing"/>
<addaction name="mActionDeletePart"/>
<addaction name="mActionReshapeFeatures"/>
<addaction name="mActionOffsetCurve"/>
<addaction name="mActionSplitFeatures"/>
<addaction name="mActionSplitParts"/>
<addaction name="mActionMergeFeatures"/>
<addaction name="mActionVertexTool"/>
<addaction name="mActionReverseLine"/>
<addaction name="mActionTrimExtendFeature"/>
</widget>
<addaction name="mActionUndo"/>
<addaction name="mActionRedo"/>
<addaction name="separator"/>
<addaction name="mActionCutFeatures"/>
<addaction name="mActionCopyFeatures"/>
<addaction name="mActionPasteFeatures"/>
<addaction name="mMenuPasteAs"/>
<addaction name="menuSelect"/>
<addaction name="mActionDeleteSelected"/>
<addaction name="mMenuSelect"/>
<addaction name="separator"/>
<addaction name="mActionAddFeature"/>
<addaction name="mActionCircularStringCurvePoint"/>
@@ -373,29 +408,11 @@
<addaction name="mMenuRegularPolygon"/>
<addaction name="mMenuEllipse"/>
<addaction name="mMenuAnnotation"/>
<addaction name="mActionMoveFeature"/>
<addaction name="mActionMoveFeatureCopy"/>
<addaction name="mActionDeleteSelected"/>
<addaction name="mActionMultiEditAttributes"/>
<addaction name="separator"/>
<addaction name="mActionRotateFeature"/>
<addaction name="mActionSimplifyFeature"/>
<addaction name="mActionAddRing"/>
<addaction name="mActionAddPart"/>
<addaction name="mActionFillRing"/>
<addaction name="mActionDeleteRing"/>
<addaction name="mActionDeletePart"/>
<addaction name="mActionReshapeFeatures"/>
<addaction name="mActionOffsetCurve"/>
<addaction name="mActionSplitFeatures"/>
<addaction name="mActionSplitParts"/>
<addaction name="mActionMergeFeatures"/>
<addaction name="mActionMergeFeatureAttributes"/>
<addaction name="mActionVertexTool"/>
<addaction name="mMenuEditAttributes"/>
<addaction name="mMenuEditGeometry"/>
<addaction name="mActionRotatePointSymbols"/>
<addaction name="mActionOffsetPointSymbol"/>
<addaction name="mActionReverseLine"/>
<addaction name="mActionTrimExtendFeature"/>
</widget>
<widget class="QMenu" name="mMeshMenu">
<property name="title">

0 comments on commit d30a806

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