Skip to content

Commit

Permalink
Fix for #8130 - WFS client: invalid columns after copy/paste.
Browse files Browse the repository at this point in the history
  • Loading branch information
to-kr committed Feb 9, 2014
1 parent 71c1ad1 commit 7689bf1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/providers/wfs/qgswfsprovider.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 7689bf1

Please sign in to comment.