Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix shifted joined attributes when join field is repeated (fixes #12589)
(cherry picked from commit 7870815)
  • Loading branch information
wonder-sk committed Jul 7, 2015
1 parent 65748d5 commit 5c2f9e6
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 5c2f9e6

Please sign in to comment.