Skip to content

Commit

Permalink
Fix shifted joined attributes when join field is repeated (fixes #12589)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 18, 2015
1 parent 03aa1e7 commit 7870815
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgsvectorlayerjoinbuffer.cpp
Expand Up @@ -237,7 +237,8 @@ void QgsVectorLayerJoinBuffer::updateFields( QgsFields& fields )
continue;

//skip the join field to avoid double field names (fields often have the same name)
if ( joinFields[idx].name() != joinFieldName )
// when using subset of field, use all the selected fields
if ( hasSubset || joinFields[idx].name() != joinFieldName )
{
QgsField f = joinFields[idx];
f.setName( prefix + f.name() );
Expand Down

0 comments on commit 7870815

Please sign in to comment.