mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Micro optimization
This commit is contained in:
parent
0224b8e4ff
commit
3113a961c1
@ -352,9 +352,10 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitFeatures( const QVect
|
||||
mLayer->changeGeometry( feat.id(), featureGeom );
|
||||
|
||||
//insert new features
|
||||
for ( int i = 0; i < newGeometries.size(); ++i )
|
||||
QgsAttributeMap attributeMap = feat.attributes().toMap();
|
||||
for ( const QgsGeometry &geom : qgis::as_const( newGeometries ) )
|
||||
{
|
||||
QgsFeature f = QgsVectorLayerUtils::createFeature( mLayer, newGeometries.at( i ), feat.attributes().toMap() );
|
||||
QgsFeature f = QgsVectorLayerUtils::createFeature( mLayer, geom, attributeMap );
|
||||
mLayer->addFeature( f );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user