[QGIS Commit] r9741 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 4 15:29:51 EST 2008


Author: mhugent
Date: 2008-12-04 15:29:51 -0500 (Thu, 04 Dec 2008)
New Revision: 9741

Modified:
   trunk/qgis/src/core/qgsvectorlayer.cpp
Log:
Copy attribute values for feature splits. Fixes bug #1381

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2008-12-04 14:40:18 UTC (rev 9740)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2008-12-04 20:29:51 UTC (rev 9741)
@@ -1714,7 +1714,15 @@
       }
     }
 
-    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 ) )



More information about the QGIS-commit mailing list