Skip to content

Commit 5945a84

Browse files
authoredNov 22, 2017
Merge pull request #5638 from pblottiere/bugfix_joins
[bugfix] Fixes #17450 by correctly setting the join info ordered list
2 parents b058df7 + 333a8e9 commit 5945a84

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎src/core/qgsvectorlayerfeatureiterator.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -722,12 +722,11 @@ void QgsVectorLayerFeatureIterator::createOrderedJoinList()
722722
int joinField = mOrderedJoinInfoList.at( i ).joinField;
723723

724724
QgsAttributeList attributes = mOrderedJoinInfoList.at( i ).attributes;
725-
QgsAttributeList::const_iterator attIt = attributes.constBegin();
726-
for ( ; attIt != attributes.constEnd(); ++attIt )
725+
for ( int n = 0; n < attributes.size(); n++ )
727726
{
728-
if ( *attIt != joinField )
727+
if ( n != joinField )
729728
{
730-
resolvedFields.insert( joinField < *attIt ? *attIt + offset - 1 : *attIt + offset );
729+
resolvedFields.insert( joinField < n ? n + offset - 1 : n + offset );
731730
}
732731
}
733732
}

0 commit comments

Comments
 (0)
Please sign in to comment.