Skip to content

Commit

Permalink
Bug fix. The %% thing works again in Actions, and now works with the
Browse files Browse the repository at this point in the history
actions names too.


git-svn-id: http://svn.osgeo.org/qgis/trunk@9033 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gjm committed Aug 8, 2008
1 parent 4f65b2b commit fcb537a
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions src/app/qgsidentifyresults.cpp
Expand Up @@ -332,24 +332,39 @@ void QgsIdentifyResults::extractAllItemData(QTreeWidgetItem* item)
// 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)));

if (item == parent->child(j))
{
mClickedOnValue = valuesIndex;
}
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;
valuesIndex++;
}
}
}

0 comments on commit fcb537a

Please sign in to comment.