Skip to content

Commit

Permalink
Merge pull request #1155 from to-kr/master
Browse files Browse the repository at this point in the history
Fix for #8130 - WFS client: invalid columns after copy/paste.
  • Loading branch information
mhugent committed May 7, 2014
2 parents 35516fd + 7689bf1 commit c64c89e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/providers/wfs/qgswfsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit c64c89e

Please sign in to comment.