# 3.5.040

## INVENTORY

### <mark style="color:blue;">Enhance setclosestaddress function allowing to insersect the results with a polygon layer</mark>

A new widget has been added to the function which allows the user to specify a polygon layer (i. e.  buildings layer). If specified, the address will be captured only for those elements of the input layer which intersect the polygon layer.&#x20;

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FOY0f5BfD52S7H4m7DIOB%2Fimage.png?alt=media&#x26;token=e57e8956-8196-4534-92ea-aa02f9e19f22" alt=""><figcaption></figcaption></figure>

This can be configured on table **config\_toolbox**. This table contains the configuration for every function in Giswater, which is stored in 3 main columns: *functionparams*, *inputparams* and *active.* In this case, the target function is called **Get address values from closest street number** and the column used for customization is called *inputparams*. This column consists of a json string that defines the widgets for every function in Giswater. The parameters that enable the user to customize the widget are the ones that belong to&#x20;

`"widgetname": "insertsectPolygonLayer"`&#x20;

which are "comboIds" and "comboNames".&#x20;

<figure><img src="https://78444640-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3OfYgdaTSD51CRsy2UO6%2Fuploads%2FDrujr78g6ziWLg6DqoOr%2Fimage.png?alt=media&#x26;token=1076ec1e-3b78-4e35-a7b9-2ee127c35bc9" alt=""><figcaption></figcaption></figure>

The values for "comboIds" must be the name or names of the polygon layers, while the values for "comboNames" must be the name of user's choice according to the polygon layer name specified in "comboIds". There must be a value called "NONE" in both "comboIds" and "comboNames" in order to keep the functionality of the widget.&#x20;

The user can add or remove as many *comboIds* and *comboNames* as wanted inside the widget *intersectPolygonLayer*, as long as json's syntax rules are followed.&#x20;

## ADMIN/SYSTEM

### <mark style="color:blue;">Bug fix: saving project sometimes crashed qgis</mark>

This issue has been solved and now it is very unlikely to happen, thus enhancing user experience.&#x20;
