Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
convert $currfield (was %%) running actions from "Identify actions" tool
  • Loading branch information
brushtyler committed Mar 14, 2012
1 parent db1c401 commit 03f8636
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/qgsattributeaction.cpp
Expand Up @@ -77,7 +77,10 @@ void QgsAttributeAction::doAction( int index, QgsFeature &feat, int defaultValue
{
QMap<QString, QVariant> substitutionMap;
if ( defaultValueIndex >= 0 )
substitutionMap.insert( "$currfield", QVariant( defaultValueIndex ) );
{
if ( feat.attributeMap().contains( defaultValueIndex ) )
substitutionMap.insert( "$currfield", feat.attributeMap()[ defaultValueIndex ] );
}

doAction( index, feat, &substitutionMap );
}
Expand Down

0 comments on commit 03f8636

Please sign in to comment.