Skip to content
Permalink
Browse files

Set features valid before adding in QgsMapToolAddFeature

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 99c16bbb845ae7d454d5fc75a7468620f5f9e9b4
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/app/qgsmaptooladdfeature.cpp
@@ -137,6 +137,7 @@ void QgsMapToolAddFeature::canvasMapReleaseEvent( QgsMapMouseEvent* e )
}

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

addFeature( vlayer, &f, false );

0 comments on commit 99c16bb

Please sign in to comment.
You can’t perform that action at this time.