Skip to content

Commit

Permalink
Fixes #17450 by correctly setting the join info ordered list
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Nov 22, 2017
1 parent b058df7 commit 333a8e9
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 333a8e9

Please sign in to comment.