Skip to content

Commit 7870815

Browse files
committed
Fix shifted joined attributes when join field is repeated (fixes #12589)
1 parent 03aa1e7 commit 7870815

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/qgsvectorlayerjoinbuffer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ void QgsVectorLayerJoinBuffer::updateFields( QgsFields& fields )
237237
continue;
238238

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

0 commit comments

Comments
 (0)