Skip to content
Permalink
Browse files

set name to feature action when shortName is not available

  • Loading branch information
slarosa committed Feb 10, 2018
1 parent 9ce02ce commit 779fe1a91d157aa455358a38282501d9269ea929
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/app/qgisapp.cpp
@@ -6446,7 +6446,8 @@ void QgisApp::refreshFeatureActions()
QList<QgsAction> actions = vlayer->actions()->actions( QStringLiteral( "Canvas" ) );
Q_FOREACH ( const QgsAction &action, actions )
{
QAction *qAction = new QAction( action.icon(), action.shortTitle(), mFeatureActionMenu );
QString actionTitle = !action.shortTitle().isEmpty() ? action.shortTitle() : action.icon().isNull() ? action.name() : QStringLiteral( "" );
QAction *qAction = new QAction( action.icon(), actionTitle, mFeatureActionMenu );
qAction->setData( QVariant::fromValue<QgsAction>( action ) );
mFeatureActionMenu->addAction( qAction );

0 comments on commit 779fe1a

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