Skip to content

Commit

Permalink
Copy attribute values for feature splits. Fixes bug #1381
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@9741 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 4, 2008
1 parent 68a5877 commit 6d85e2d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -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 ) )
Expand Down

0 comments on commit 6d85e2d

Please sign in to comment.