[QGIS Commit] r9033 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Aug 8 05:30:05 EDT 2008


Author: gjm
Date: 2008-08-08 05:30:05 -0400 (Fri, 08 Aug 2008)
New Revision: 9033

Modified:
   trunk/qgis/src/app/qgsidentifyresults.cpp
Log:
Bug fix. The %% thing works again in Actions, and now works with the
actions names too.


Modified: trunk/qgis/src/app/qgsidentifyresults.cpp
===================================================================
--- trunk/qgis/src/app/qgsidentifyresults.cpp	2008-08-08 08:43:12 UTC (rev 9032)
+++ trunk/qgis/src/app/qgsidentifyresults.cpp	2008-08-08 09:30:05 UTC (rev 9033)
@@ -332,24 +332,39 @@
   // to pick up which child that actually is (the parent in the
   // identify results dialog box is just one of the children
   // that has been chosen by some method).
-  
+
+  int valuesIndex = 0;
+
   for (int j = 0; j < parent->childCount(); ++j)
   {
-    if ( parent->child(j)->text(0) != "action" ) {
-      // For derived attributes, build up a virtual name
-      if (parent->child(j)->text(0) == mDerivedLabel ) {
-	for (int k = 0; k < parent->child(j)->childCount(); ++k)
-	  mValues.push_back(
-	    std::make_pair(mDerivedLabel + "." 
-			   + parent->child(j)->child(k)->text(0), 
-			   parent->child(j)->child(k)->text(1)));
+    // For derived attributes, build up a virtual name
+    if (parent->child(j)->text(0) == mDerivedLabel ) {
+      for (int k = 0; k < parent->child(j)->childCount(); ++k)
+      {
+	mValues.push_back(
+	  std::make_pair(mDerivedLabel + "." 
+			 + parent->child(j)->child(k)->text(0), 
+			 parent->child(j)->child(k)->text(1)));
+
+	if (item == parent->child(j)->child(k))
+	{
+	  mClickedOnValue = valuesIndex;
+	}
+
+	valuesIndex++;
       }
-      else // do the actual feature attributes
-	mValues.push_back(std::make_pair(parent->child(j)->text(0), 
-					 parent->child(j)->text(1)));
+    }
+    else // do the actual feature attributes
+    {
+      mValues.push_back(std::make_pair(parent->child(j)->text(0), 
+				       parent->child(j)->text(1)));
 
-    if (parent->child(j)->text(0) == item->text(0))
-      mClickedOnValue = j;
+      if (item == parent->child(j))
+      {
+	mClickedOnValue = valuesIndex;
+      }
+
+      valuesIndex++;
     }
   }
 }



More information about the QGIS-commit mailing list