Skip to content
Browse files
Suppress attribute form popup if layer has no fields
Prevents empty form popup for layers with no fields (eg memory layers).
If desired, this behaviour can be overriden by the layer's feature
form suppress option, eg if form has python logic which makes it useful
even with no fields.

(fix #10775)
  • Loading branch information
nyalldawson committed Feb 25, 2015
1 parent c3c945b commit ee68332ed76a0255f017d8070654154cfa20c1ec
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/qgsfeatureaction.cpp
@@ -163,8 +163,10 @@ bool QgsFeatureAction::addFeature( const QgsAttributeMap& defaultAttributes, boo
mFeature.setAttribute( idx, v );

// show the dialog to enter attribute values
bool isDisabledAttributeValuesDlg = settings.value( "/qgis/digitizing/disable_enter_attribute_values_dialog", false ).toBool();
//show the dialog to enter attribute values
//only show if enabled in settings and layer has fields
bool isDisabledAttributeValuesDlg = ( fields.count() == 0 ) || settings.value( "/qgis/digitizing/disable_enter_attribute_values_dialog", false ).toBool();

// override application-wide setting with any layer setting
switch ( mLayer->featureFormSuppress() )

0 comments on commit ee68332

Please sign in to comment.