mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
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)
This commit is contained in:
parent
c3c945b13b
commit
ee68332ed7
@ -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() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user