Skip to content
Permalink
Browse files
Group attribute table filter actions in a dedicated sub menu
to keep the Layer menu compact
  • Loading branch information
DelazJ authored and nyalldawson committed Jun 8, 2021
1 parent af7de9d commit d9382dae3dfe179ef5a3f1c7a860668d59ffaf5e
Showing with 15 additions and 3 deletions.
  1. +6 −0 src/app/qgisapp.cpp
  2. +9 −3 src/ui/qgisapp.ui
@@ -14822,6 +14822,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionSelectByForm->setEnabled( false );
mActionLabeling->setEnabled( false );
mActionOpenTable->setEnabled( false );
mMenuFilterTable->setEnabled( false );
mActionOpenTableSelected->setEnabled( false );
mActionOpenTableVisible->setEnabled( false );
mActionOpenTableEdited->setEnabled( false );
@@ -14975,6 +14976,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionSelectByExpression->setEnabled( true );
mActionSelectByForm->setEnabled( true );
mActionOpenTable->setEnabled( true );
mMenuFilterTable->setEnabled( true );
mActionOpenTableSelected->setEnabled( true );
mActionOpenTableVisible->setEnabled( true );
mActionOpenTableEdited->setEnabled( true );
@@ -15220,6 +15222,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomActualSize->setEnabled( true );
mActionZoomToLayer->setEnabled( true );
mActionOpenTable->setEnabled( false );
mMenuFilterTable->setEnabled( false );
mActionOpenTableSelected->setEnabled( false );
mActionOpenTableVisible->setEnabled( false );
mActionOpenTableEdited->setEnabled( false );
@@ -15334,6 +15337,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomActualSize->setEnabled( false );
mActionZoomToLayer->setEnabled( true );
mActionOpenTable->setEnabled( false );
mMenuFilterTable->setEnabled( false );
mActionOpenTableSelected->setEnabled( false );
mActionOpenTableVisible->setEnabled( false );
mActionOpenTableEdited->setEnabled( false );
@@ -15402,6 +15406,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomActualSize->setEnabled( false );
mActionZoomToLayer->setEnabled( true );
mActionOpenTable->setEnabled( false );
mMenuFilterTable->setEnabled( false );
mActionOpenTableSelected->setEnabled( false );
mActionOpenTableVisible->setEnabled( false );
mActionOpenTableEdited->setEnabled( false );
@@ -15470,6 +15475,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionZoomActualSize->setEnabled( false );
mActionZoomToLayer->setEnabled( true );
mActionOpenTable->setEnabled( false );
mMenuFilterTable->setEnabled( false );
mActionOpenTableSelected->setEnabled( false );
mActionOpenTableVisible->setEnabled( false );
mActionOpenTableEdited->setEnabled( false );
@@ -201,6 +201,14 @@
<addaction name="mActionAddVectorTileLayer"/>
<addaction name="mActionAddPointCloudLayer"/>
</widget>
<widget class="QMenu" name="mMenuFilterTable">
<property name="title">
<string>Filter Attribute Table</string>
</property>
<addaction name="mActionOpenTableSelected"/>
<addaction name="mActionOpenTableVisible"/>
<addaction name="mActionOpenTableEdited"/>
</widget>
<addaction name="mActionDataSourceManager"/>
<addaction name="mNewLayerMenu"/>
<addaction name="mAddLayerMenu"/>
@@ -214,9 +222,7 @@
<addaction name="mActionPasteLayer"/>
<addaction name="separator"/>
<addaction name="mActionOpenTable"/>
<addaction name="mActionOpenTableSelected"/>
<addaction name="mActionOpenTableVisible"/>
<addaction name="mActionOpenTableEdited"/>
<addaction name="mMenuFilterTable"/>
<addaction name="mActionToggleEditing"/>
<addaction name="mActionSaveLayerEdits"/>
<addaction name="mActionAllEdits"/>

0 comments on commit d9382da

Please sign in to comment.