Skip to content

Commit

Permalink
Show actions menu in feature form
Browse files Browse the repository at this point in the history
Fix #16889
  • Loading branch information
m-kuhn committed Oct 2, 2017
1 parent 471204d commit 11eb9cf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsattributeactionpropertiesdialog.cpp
Expand Up @@ -58,7 +58,7 @@ QgsAttributeActionPropertiesDialog::QgsAttributeActionPropertiesDialog( QgsVecto
QSet<QString> defaultActionScopes;
defaultActionScopes << QStringLiteral( "Canvas" )
<< QStringLiteral( "FieldSpecific" )
<< QStringLiteral( "AttributeTableRow" )
<< QStringLiteral( "Feature" )
<< QStringLiteral( "FeatureForm" );

init( defaultActionScopes );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsattributetableview.cpp
Expand Up @@ -185,7 +185,7 @@ QWidget *QgsAttributeTableView::createActionWidget( QgsFeatureId fid )
connect( act, &QAction::triggered, this, &QgsAttributeTableView::actionTriggered );
actionList << act;

if ( mFilterModel->layer()->actions()->defaultAction( QStringLiteral( "AttributeTableRow" ) ).id() == action.id() )
if ( mFilterModel->layer()->actions()->defaultAction( QStringLiteral( "Feature" ) ).id() == action.id() )
defaultAction = act;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsfeaturelistview.cpp
Expand Up @@ -297,7 +297,7 @@ void QgsFeatureListView::contextMenuEvent( QContextMenuEvent *event )
{
QgsFeature feature = mModel->data( index, QgsFeatureListModel::FeatureRole ).value<QgsFeature>();

QgsActionMenu *menu = new QgsActionMenu( mModel->layerCache()->layer(), feature, QStringLiteral( "AttributeTableRow" ), this );
QgsActionMenu *menu = new QgsActionMenu( mModel->layerCache()->layer(), feature, QStringLiteral( "Feature" ), this );
menu->exec( event->globalPos() );
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsattributedialog.cpp
Expand Up @@ -102,7 +102,7 @@ void QgsAttributeDialog::init( QgsVectorLayer *layer, QgsFeature *feature, const
connect( buttonBox, &QDialogButtonBox::accepted, this, &QgsAttributeDialog::accept );
connect( layer, &QObject::destroyed, this, &QWidget::close );

QgsActionMenu *menu = new QgsActionMenu( layer, mAttributeForm->feature(), QStringLiteral( "AttributeTableRow" ), this );
QgsActionMenu *menu = new QgsActionMenu( layer, mAttributeForm->feature(), QStringLiteral( "Feature" ), this );
if ( !menu->actions().isEmpty() )
{
QMenuBar *menuBar = new QMenuBar( this );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsidentifymenu.cpp
Expand Up @@ -259,7 +259,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
createMenu = !mCustomActionRegistry.mapLayerActions( layer, QgsMapLayerAction::SingleFeature ).isEmpty();
if ( !createMenu && mShowFeatureActions )
{
QgsActionMenu *featureActionMenu = new QgsActionMenu( layer, results[0].mFeature, QStringLiteral( "AttributeTableRow" ), this );
QgsActionMenu *featureActionMenu = new QgsActionMenu( layer, results[0].mFeature, QStringLiteral( "Feature" ), this );
createMenu = !featureActionMenu->actions().isEmpty();
delete featureActionMenu;
}
Expand Down Expand Up @@ -344,7 +344,7 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
QList<QgsMapLayerAction *> customFeatureActions = mCustomActionRegistry.mapLayerActions( layer, QgsMapLayerAction::SingleFeature );
if ( mShowFeatureActions )
{
featureActionMenu = new QgsActionMenu( layer, result.mFeature, QStringLiteral( "AttributeTableRow" ), layerMenu );
featureActionMenu = new QgsActionMenu( layer, result.mFeature, QStringLiteral( "Feature" ), layerMenu );
}

// feature title
Expand Down

0 comments on commit 11eb9cf

Please sign in to comment.