Skip to content

Commit 72b476e

Browse files
committedMar 30, 2013
Pass fields into new feature in add tool
1 parent fe59da5 commit 72b476e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/app/qgsmaptooladdfeature.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
113113
//grass provider has its own mechanism of feature addition
114114
if ( provider->capabilities() & QgsVectorDataProvider::AddFeatures )
115115
{
116-
QgsFeature* f = new QgsFeature( 0 );
116+
QgsFeature* f = new QgsFeature( vlayer->pendingFields(), 0 );
117117

118118
QgsGeometry *g = 0;
119119
if ( layerWKBType == QGis::WKBPoint || layerWKBType == QGis::WKBPoint25D )
@@ -198,7 +198,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
198198
}
199199

200200
//create QgsFeature with wkb representation
201-
QgsFeature* f = new QgsFeature( 0 );
201+
QgsFeature* f = new QgsFeature( vlayer->pendingFields(), 0 );
202202

203203
QgsGeometry *g;
204204

0 commit comments

Comments
 (0)
Please sign in to comment.