Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #5638 from pblottiere/bugfix_joins
Browse files Browse the repository at this point in the history
[bugfix] Fixes #17450 by correctly setting the join info ordered list
  • Loading branch information
pblottiere committed Nov 22, 2017
2 parents b058df7 + 333a8e9 commit 5945a84
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core/qgsvectorlayerfeatureiterator.cpp
Expand Up @@ -722,12 +722,11 @@ void QgsVectorLayerFeatureIterator::createOrderedJoinList()
int joinField = mOrderedJoinInfoList.at( i ).joinField;

QgsAttributeList attributes = mOrderedJoinInfoList.at( i ).attributes;
QgsAttributeList::const_iterator attIt = attributes.constBegin();
for ( ; attIt != attributes.constEnd(); ++attIt )
for ( int n = 0; n < attributes.size(); n++ )
{
if ( *attIt != joinField )
if ( n != joinField )
{
resolvedFields.insert( joinField < *attIt ? *attIt + offset - 1 : *attIt + offset );
resolvedFields.insert( joinField < n ? n + offset - 1 : n + offset );
}
}
}
Expand Down

0 comments on commit 5945a84

Please sign in to comment.