On Thu, 12 Dec 2024 at 20:32, Juho Ervasti via QGIS-Developer
<qgis-developer@lists.osgeo.org> wrote:
>
> Hey,
>
> I'm writing about a QGIS issue https://github.com/qgis/QGIS/issues/59494. In 
> summary when using the merge feature tool the attributes for the pending new 
> feature are initially populated with a default value for the field if one is 
> set in the data provider (e.g. Postgres, OGR). The default value set in QGIS 
> doesn't have an effect.
>
> Is this the intended behavior? At least in some cases it would make sense if 
> the value came from the selected features, like it does if a default value is 
> not set.
>
> If it is the intended behavior and shouldn't be changed outright, would it be 
> okay to add an option for it in the Attribute form's "Policies" section, 
> similar to the splitting and duplicating policies?

This was always the intention, so go ahead! Note that there's already
an enum for this at Qgis::FieldDomainMergePolicy. You could follow the
same procedure as is used for Qgis::FieldDomainSplitPolicy to expose
this, auto-populate when reading OGR data sources, and then attach to
QgsField/QgsVectorLayer.

Nyall

>
> Best regards,
> Juho Ervasti
> GIS Specialist
> Gispo Finland Ltd.
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to