Skip to content

Commit c64c89e

Browse files
committed
Merge pull request #1155 from to-kr/master
Fix for #8130 - WFS client: invalid columns after copy/paste.
2 parents 35516fd + 7689bf1 commit c64c89e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/providers/wfs/qgswfsprovider.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,21 +301,14 @@ bool QgsWFSProvider::addFeatures( QgsFeatureList &flist )
301301

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

304-
//add thematic attributes
305-
const QgsFields* fields = featureIt->fields();
306-
if ( !fields )
307-
{
308-
continue;
309-
}
310-
311304
QgsAttributes featureAttributes = featureIt->attributes();
312305
int nAttrs = featureAttributes.size();
313306
for ( int i = 0; i < nAttrs; ++i )
314307
{
315308
const QVariant& value = featureAttributes.at( i );
316309
if ( value.isValid() && !value.isNull() )
317310
{
318-
QDomElement fieldElem = transactionDoc.createElementNS( mWfsNamespace, fields->field( i ).name() );
311+
QDomElement fieldElem = transactionDoc.createElementNS( mWfsNamespace, mFields.at( i ).name() );
319312
QDomText fieldText = transactionDoc.createTextNode( value.toString() );
320313
fieldElem.appendChild( fieldText );
321314
featureElem.appendChild( fieldElem );

0 commit comments

Comments
 (0)