mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Followup 363336, fixing adding features to OGR data providers
(addFeature cannot be called directly - it must be called by addFeatures to ensure the various edition setup code is called)
This commit is contained in:
parent
dc7198a754
commit
75fa28f5f3
@ -1226,7 +1226,7 @@ OGRGeometryH QgsOgrProvider::ConvertGeometryIfNecessary( OGRGeometryH hGeom )
|
||||
return OGR_G_ForceTo( hGeom, layerGeomType, nullptr );
|
||||
}
|
||||
|
||||
bool QgsOgrProvider::addFeature( QgsFeature &f )
|
||||
bool QgsOgrProvider::addFeaturePrivate( QgsFeature &f )
|
||||
{
|
||||
bool returnValue = true;
|
||||
OGRFeatureDefnH fdef = OGR_L_GetLayerDefn( ogrLayer );
|
||||
@ -1386,7 +1386,7 @@ bool QgsOgrProvider::addFeatures( QgsFeatureList &flist )
|
||||
bool returnvalue = true;
|
||||
for ( QgsFeatureList::iterator it = flist.begin(); it != flist.end(); ++it )
|
||||
{
|
||||
if ( !addFeature( *it ) )
|
||||
if ( !addFeaturePrivate( *it ) )
|
||||
{
|
||||
returnvalue = false;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ class QgsOgrProvider : public QgsVectorDataProvider
|
||||
|
||||
mutable QStringList mSubLayerList;
|
||||
|
||||
bool addFeature( QgsFeature &f ) override;
|
||||
bool addFeaturePrivate( QgsFeature &f );
|
||||
//! Deletes one feature
|
||||
bool deleteFeature( QgsFeatureId id );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user