Skip to content


Suppress attribute form popup if layer has no fields
Browse files Browse the repository at this point in the history
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 fac21c1 commit c6581e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/qgsfeatureaction.cpp
Expand Up @@ -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() )
Expand Down

0 comments on commit c6581e7

Please sign in to comment.