Skip to content
Permalink
Browse files

set feature when starting action on attribute edit form

  • Loading branch information
signedav authored and m-kuhn committed Nov 1, 2017
1 parent 5ffbb35 commit 1ffc3fd19067ca035148cbfa671f02afab46f346
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/gui/qgsactionmenu.cpp
@@ -89,6 +89,7 @@ void QgsActionMenu::triggerAction()
{
// define custom substitutions: layer id and clicked coords
QgsExpressionContext context = mLayer->createExpressionContext();
context.setFeature( mFeature );

QgsExpressionContextScope *actionScope = new QgsExpressionContextScope();
actionScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "action_scope" ), mActionScope, true ) );

0 comments on commit 1ffc3fd

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