When an algorithm has a distance parameter in meters/feet/etc (i.e.
non-geographic distances), show a combo box allowing choice of
unit type.
(We don't (and should never) expose this for distances in degrees --
it's up to users in this situation to choose a suitable local
projection and reproject their data to match. Refs: a recent
talk by @volaya)
Fixes#19329 (https://issues.qgis.org/issues/19329)
Optional layer parameters in processing algorithms used in the graphical modeler
add an empty string as the default parameter value, which can raise an exception
during algorithm execution. This update replaces the default empty string with a
default 'Not selected' option.
It turns out that an empty QComboBox evaluates to False:
>>> t=QLineEdit()
>>> bool(t)
True
>>> c=QComboBox()
>>> bool(c)
False
Due to that, the 'TABLE' parameter was missing if its (editable) combo box was empty.
Original error - while updating an algorithm's parameters (gdal:importvectorintopostgisdatabaseavailableconnections)
Traceback (most recent call last):
File "/home/martin/qgis/git-master/build-debug/output/python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py", line 121, in parametersHaveChanged
or (not p.checkValueIsAcceptable(parameters[p.name()])):
KeyError: 'TABLE'
their underlying algorithm's provider
E.g. for model outputs generated by a saga algorithm, only
sdat and shp files are valid outputs. So only give users choices
of these instead of all formats.
Also fixes temporary file names generated as part of model
execution may use formats which are not compatible with the
algorithm's provider.
Fixes#18908
Instead, only store references to the algorithm id string, and
use this to retrieve algorithms when the actions are triggered.
This avoids errors caused by the algorithm instances being
removed, e.g. due to plugin removal or reload of providers
(e.g. by opening options dialog).
Fixes#19070
This is used in the algorithm's tooltip in the toolbox, and is intended
for single sentence description of the algorithm, e.g.
"Converts 2D features to 3D by sampling a DEM raster."
Convert grass algorithms to use short description for the
descriptive parts of their names, to cleanup the toolbox
and make it more uniform.