Skip to content
Permalink
Browse files

Merge pull request #5638 from pblottiere/bugfix_joins

[bugfix] Fixes #17450 by correctly setting the join info ordered list
  • Loading branch information
pblottiere committed Nov 22, 2017
2 parents b058df7 + 333a8e9 commit 5945a84d2159a05b35e42b1cb254e5f9103c9c6a
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/core/qgsvectorlayerfeatureiterator.cpp
@@ -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 );
}
}
}

0 comments on commit 5945a84

Please sign in to comment.
You can’t perform that action at this time.