Skip to content
Permalink
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 fac21c1 commit c6581e72b0217ea220822091fbde61fb2e962bc1
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 c6581e7

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