mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Fix broken QgsFeatureStore::setFields method
Was setting fields only on temporary copies of the features, not the stored features themselves
This commit is contained in:
parent
f628ebd423
commit
910cb01698
@ -19,7 +19,7 @@ class QgsFeatureStore
|
||||
/** Get fields list */
|
||||
QgsFields& fields();
|
||||
|
||||
/** Set fields. Resets feauters fields to pointer to new internal fields. */
|
||||
/** Set fields. Resets feature's fields to pointer to new internal fields. */
|
||||
void setFields( const QgsFields & fields );
|
||||
|
||||
/** Get crs */
|
||||
|
@ -40,9 +40,10 @@ QgsFeatureStore::~QgsFeatureStore()
|
||||
void QgsFeatureStore::setFields( const QgsFields & fields )
|
||||
{
|
||||
mFields = fields;
|
||||
Q_FOREACH ( QgsFeature feature, mFeatures )
|
||||
QgsFeatureList::iterator it = mFeatures.begin();
|
||||
for ( ; it != mFeatures.end(); ++it )
|
||||
{
|
||||
feature.setFields( mFields );
|
||||
( *it ).setFields( mFields );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class CORE_EXPORT QgsFeatureStore
|
||||
/** Get fields list */
|
||||
QgsFields& fields() { return mFields; }
|
||||
|
||||
/** Set fields. Resets feauters fields to pointer to new internal fields. */
|
||||
/** Set fields. Resets feature's fields to pointer to new internal fields. */
|
||||
void setFields( const QgsFields & fields );
|
||||
|
||||
/** Get crs */
|
||||
|
Loading…
x
Reference in New Issue
Block a user