Skip to content

Commit

Permalink
List both Feature and Layer actions
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Aug 16, 2021
1 parent cd6cd2f commit 6a163ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/vector/qgsattributesformproperties.cpp
Expand Up @@ -143,8 +143,8 @@ void QgsAttributesFormProperties::initAvailableWidgetsTree()
catitem = mAvailableWidgetsTree->addItem( mAvailableWidgetsTree->invisibleRootItem(), catItemData );

const QgsActionManager *actionManager { mLayer->actions() };
// TODO: action type: any or Feature?
const QList<QgsAction> actions { actionManager->actions( QStringLiteral( "Feature" ) ) };
QList<QgsAction> actions { actionManager->actions( QStringLiteral( "Feature" ) ) };
actions.append( actionManager->actions( QStringLiteral( "Layer" ) ) );

for ( const auto &action : std::as_const( actions ) )
{
Expand All @@ -153,7 +153,7 @@ void QgsAttributesFormProperties::initAvailableWidgetsTree()
const QString actionTitle { action.shortTitle().isEmpty() ? action.shortTitle() : action.name() };
DnDTreeItemData itemData = DnDTreeItemData( DnDTreeItemData::Action, action.id().toString(), actionTitle );
itemData.setShowLabel( true );
/* QTreeWidgetItem *item = */ mAvailableWidgetsTree->addItem( catitem, itemData );
mAvailableWidgetsTree->addItem( catitem, itemData );
}
}

Expand Down

0 comments on commit 6a163ee

Please sign in to comment.