Skip to content

Commit 779fe1a

Browse files
committed
set name to feature action when shortName is not available
1 parent 9ce02ce commit 779fe1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/app/qgisapp.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -6446,7 +6446,8 @@ void QgisApp::refreshFeatureActions()
64466446
QList<QgsAction> actions = vlayer->actions()->actions( QStringLiteral( "Canvas" ) );
64476447
Q_FOREACH ( const QgsAction &action, actions )
64486448
{
6449-
QAction *qAction = new QAction( action.icon(), action.shortTitle(), mFeatureActionMenu );
6449+
QString actionTitle = !action.shortTitle().isEmpty() ? action.shortTitle() : action.icon().isNull() ? action.name() : QStringLiteral( "" );
6450+
QAction *qAction = new QAction( action.icon(), actionTitle, mFeatureActionMenu );
64506451
qAction->setData( QVariant::fromValue<QgsAction>( action ) );
64516452
mFeatureActionMenu->addAction( qAction );
64526453

0 commit comments

Comments
 (0)