Skip to content
Permalink
Browse files
Fix for #8130 - WFS client: invalid columns after copy/paste.
  • Loading branch information
to-kr committed Feb 9, 2014
1 parent 71c1ad1 commit 7689bf1977727d2836298a4f1e73302ee31d7302
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/providers/wfs/qgswfsprovider.cpp
@@ -339,21 +339,14 @@ bool QgsWFSProvider::addFeatures( QgsFeatureList &flist )

QDomElement featureElem = transactionDoc.createElementNS( mWfsNamespace, tname );

//add thematic attributes
const QgsFields* fields = featureIt->fields();
if ( !fields )
{
continue;
}

QgsAttributes featureAttributes = featureIt->attributes();
int nAttrs = featureAttributes.size();
for ( int i = 0; i < nAttrs; ++i )
{
const QVariant& value = featureAttributes.at( i );
if ( value.isValid() && !value.isNull() )
{
QDomElement fieldElem = transactionDoc.createElementNS( mWfsNamespace, fields->field( i ).name() );
QDomElement fieldElem = transactionDoc.createElementNS( mWfsNamespace, mFields.at( i ).name() );
QDomText fieldText = transactionDoc.createTextNode( value.toString() );
fieldElem.appendChild( fieldText );
featureElem.appendChild( fieldElem );

0 comments on commit 7689bf1

Please sign in to comment.