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 779fe1a
Showing 1 changed file with 2 additions and 1 deletion.
@@ -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.