Skip to content

Commit

Permalink
set name to feature action when shortName is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Feb 10, 2018
1 parent 9ce02ce commit 779fe1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -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 );

Expand Down

0 comments on commit 779fe1a

Please sign in to comment.