Skip to content
Permalink
Browse files

Prefix joined field with layer name to make conflict between attribut…

…es with the same name less likely
  • Loading branch information
mhugent committed Aug 14, 2012
1 parent 3f4df9f commit 664973866f26a53ac56c7e4395b66c8b0dbfb0a6
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/qgsvectorlayerjoinbuffer.cpp
@@ -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 );
}
}

0 comments on commit 6649738

Please sign in to comment.
You can’t perform that action at this time.