Skip to content

Commit 6d85e2d

Browse files
author
mhugent
committed
Copy attribute values for feature splits. Fixes bug #1381
git-svn-id: http://svn.osgeo.org/qgis/trunk@9741 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 68a5877 commit 6d85e2d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/core/qgsvectorlayer.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,15 @@ int QgsVectorLayer::splitFeatures( const QList<QgsPoint>& splitLine, bool topolo
17141714
}
17151715
}
17161716

1717-
select( QgsAttributeList(), bBox, true, true );
1717+
//we need the feature attributes because the attributes values
1718+
//are copied to the new features
1719+
QgsAttributeList attributes;
1720+
if(mDataProvider)
1721+
{
1722+
attributes = mDataProvider->attributeIndexes();
1723+
}
1724+
attributes += mAddedAttributeIds.toList();
1725+
select( attributes, bBox, true, true );
17181726

17191727
QgsFeature f;
17201728
while ( nextFeature( f ) )

0 commit comments

Comments
 (0)