[QGIS Commit] r9014 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Aug 7 02:54:15 EDT 2008


Author: gjm
Date: 2008-08-07 02:54:14 -0400 (Thu, 07 Aug 2008)
New Revision: 9014

Modified:
   trunk/qgis/src/core/qgsattributeaction.cpp
Log:
Fix for ticket #953. 


Modified: trunk/qgis/src/core/qgsattributeaction.cpp
===================================================================
--- trunk/qgis/src/core/qgsattributeaction.cpp	2008-08-07 00:59:45 UTC (rev 9013)
+++ trunk/qgis/src/core/qgsattributeaction.cpp	2008-08-07 06:54:14 UTC (rev 9014)
@@ -105,8 +105,12 @@
 
   for (unsigned int i = 0; i < values.size(); ++i)
     {
-      QString to_replace = "%" + values[i].first;
-      expanded_action = expanded_action.replace(to_replace, values[i].second);
+      // Check for a replace a quoted version and a non-quoted version.
+      QString to_replace_1 = "[%" + values[i].first + "]";
+      QString to_replace_2 = "%" + values[i].first;
+
+      expanded_action = expanded_action.replace(to_replace_1, values[i].second);
+      expanded_action = expanded_action.replace(to_replace_2, values[i].second);
     }
 
   return expanded_action;



More information about the QGIS-commit mailing list