The following commit has been merged in the master branch:
commit 03f86366cd8b0764377f84f0c6c1dd241bb79294
Author: Giuseppe Sucameli <brush.ty...@gmail.com>
Date:   Wed Mar 14 00:54:36 2012 +0100

    convert $currfield (was %%) running actions from "Identify actions" tool

diff --git a/src/core/qgsattributeaction.cpp b/src/core/qgsattributeaction.cpp
index f934d1c..b5a8fe5 100644
--- a/src/core/qgsattributeaction.cpp
+++ b/src/core/qgsattributeaction.cpp
@@ -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 );
 }

-- 
The Quantum GIS in Debian project

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to