Skip to content
Permalink
Browse files

Merge pull request #1155 from to-kr/master

Fix for #8130 - WFS client: invalid columns after copy/paste.
  • Loading branch information
mhugent committed May 7, 2014
2 parents 35516fd + 7689bf1 commit c64c89e7ddbfd3c3c6b2987aae3f574bb3fb158e
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/providers/wfs/qgswfsprovider.cpp
@@ -301,21 +301,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 c64c89e

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