We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7c840f commit df25981Copy full SHA for df25981
src/app/qgsmaptooloffsetcurve.cpp
@@ -101,6 +101,16 @@ void QgsMapToolOffsetCurve::canvasReleaseEvent( QMouseEvent * e )
101
{
102
QgsFeature f;
103
f.setGeometry( mModifiedGeometry );
104
+
105
+ //add empty values for all fields (allows to insert attribute values via the feature form in the same session)
106
+ QgsAttributeMap attMap;
107
+ const QgsFieldMap& fields = vlayer->pendingFields();
108
+ QgsFieldMap::const_iterator fieldIt = fields.constBegin();
109
+ for ( ; fieldIt != fields.constEnd(); ++fieldIt )
110
+ {
111
+ attMap.insert( fieldIt.key(), QVariant() );
112
+ }
113
+ f.setAttributeMap( attMap );
114
editOk = vlayer->addFeature( f );
115
}
116
0 commit comments