Skip to content

Commit 150a5de

Browse files
author
gjm
committed
Bug fix. The %% thing works again in Actions, and now works with the
actions names too. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9033 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 455bc86 commit 150a5de

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

src/app/qgsidentifyresults.cpp

+29-14
Original file line numberDiff line numberDiff line change
@@ -332,24 +332,39 @@ void QgsIdentifyResults::extractAllItemData(QTreeWidgetItem* item)
332332
// to pick up which child that actually is (the parent in the
333333
// identify results dialog box is just one of the children
334334
// that has been chosen by some method).
335-
335+
336+
int valuesIndex = 0;
337+
336338
for (int j = 0; j < parent->childCount(); ++j)
337339
{
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;
346365
}
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)));
350366

351-
if (parent->child(j)->text(0) == item->text(0))
352-
mClickedOnValue = j;
367+
valuesIndex++;
353368
}
354369
}
355370
}

0 commit comments

Comments
 (0)