Skip to content

Commit

Permalink
Set features valid before adding in QgsMapToolAddFeature
Browse files Browse the repository at this point in the history
Fixes a bug where features have been duplicated instead of edited, especially
annoying with memory layers.

See
http://gis.stackexchange.com/questions/150326/problem-with-memory-storage-type-in-pyqgis-when-updating-with-auto-form
  • Loading branch information
m-kuhn committed Jun 18, 2015
1 parent be031c4 commit 99c16bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -137,6 +137,7 @@ void QgsMapToolAddFeature::canvasMapReleaseEvent( QgsMapMouseEvent* e )
}

f.setGeometry( g );
f.setValid( true );

addFeature( vlayer, &f, false );

Expand Down

0 comments on commit 99c16bb

Please sign in to comment.