Copy attribute values for feature splits. Fixes bug #1381

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9741 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2008-12-04 20:29:51 +00:00
parent d97dfd7c7f
commit 204a5c6cf4

View File

@ -1714,7 +1714,15 @@ int QgsVectorLayer::splitFeatures( const QList<QgsPoint>& splitLine, bool topolo
}
}
select( QgsAttributeList(), bBox, true, true );
//we need the feature attributes because the attributes values
//are copied to the new features
QgsAttributeList attributes;
if(mDataProvider)
{
attributes = mDataProvider->attributeIndexes();
}
attributes += mAddedAttributeIds.toList();
select( attributes, bBox, true, true );
QgsFeature f;
while ( nextFeature( f ) )