@@ -332,24 +332,39 @@ void QgsIdentifyResults::extractAllItemData(QTreeWidgetItem* item)
332
332
// to pick up which child that actually is (the parent in the
333
333
// identify results dialog box is just one of the children
334
334
// that has been chosen by some method).
335
-
335
+
336
+ int valuesIndex = 0 ;
337
+
336
338
for (int j = 0 ; j < parent->childCount (); ++j)
337
339
{
338
- if ( parent->child (j)->text (0 ) != " action" ) {
339
- // For derived attributes, build up a virtual name
340
- if (parent->child (j)->text (0 ) == mDerivedLabel ) {
341
- for (int k = 0 ; k < parent->child (j)->childCount (); ++k)
342
- mValues .push_back (
343
- std::make_pair (mDerivedLabel + " ."
344
- + parent->child (j)->child (k)->text (0 ),
345
- parent->child (j)->child (k)->text (1 )));
340
+ // For derived attributes, build up a virtual name
341
+ if (parent->child (j)->text (0 ) == mDerivedLabel ) {
342
+ for (int k = 0 ; k < parent->child (j)->childCount (); ++k)
343
+ {
344
+ mValues .push_back (
345
+ std::make_pair (mDerivedLabel + " ."
346
+ + parent->child (j)->child (k)->text (0 ),
347
+ parent->child (j)->child (k)->text (1 )));
348
+
349
+ if (item == parent->child (j)->child (k))
350
+ {
351
+ mClickedOnValue = valuesIndex;
352
+ }
353
+
354
+ valuesIndex++;
355
+ }
356
+ }
357
+ else // do the actual feature attributes
358
+ {
359
+ mValues .push_back (std::make_pair (parent->child (j)->text (0 ),
360
+ parent->child (j)->text (1 )));
361
+
362
+ if (item == parent->child (j))
363
+ {
364
+ mClickedOnValue = valuesIndex;
346
365
}
347
- else // do the actual feature attributes
348
- mValues .push_back (std::make_pair (parent->child (j)->text (0 ),
349
- parent->child (j)->text (1 )));
350
366
351
- if (parent->child (j)->text (0 ) == item->text (0 ))
352
- mClickedOnValue = j;
367
+ valuesIndex++;
353
368
}
354
369
}
355
370
}
0 commit comments