Skip to content

Commit

Permalink
Prefix joined field with layer name to make conflict between attribut…
Browse files Browse the repository at this point in the history
…es with the same name less likely
  • Loading branch information
mhugent committed Aug 14, 2012
1 parent 3f4df9f commit 6649738
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgsvectorlayerjoinbuffer.cpp
Expand Up @@ -99,7 +99,9 @@ void QgsVectorLayerJoinBuffer::updateFieldMap( QgsFieldMap& fields, int& maxInde
//skip the join field to avoid double field names (fields often have the same name)
if ( fieldIt.key() != joinIt->joinField )
{
fields.insert( maxIndex + 1 + fieldIt.key(), fieldIt.value() );
QgsField f = fieldIt.value();
f.setName( joinLayer->name() + "_" + f.name() );
fields.insert( maxIndex + 1 + fieldIt.key(), f );
}
}

Expand Down

0 comments on commit 6649738

Please sign in to comment.