And:
- fix enable state of selected features only after changing between
map layers with/without selections
- fix state of selected features only when running an algorithm
from the history list, e.g. respect original setting for
selected features only (or not)
- ensure no duplicate changed signals are sent, and correctly
emit changed signals in all applicable circumstances
- handle drag and dropped layers from browser panel (UX fix)
- soak with unit tests
For algorithms with multiple parameters depending on a vector layer parameter, the code that loads the layer in the background is called repeatedly, impacting performance. A small layer cache is implemented with these changes, so the dialog only tries to load the layer once.
Also exposes this capability to modeler - so that model algorithms
can use data defined parameters within their child algorithms.
TODO:
- tests
- setting the associated vector layer
A new widget which handles parameter values for child algorithms
within a model. Instead of the previous approach of requiring
individual widget wrappers to handle creation of a suitable
model widget, we do all this automatically for them.
This widget uses a stacked widget with a toolbutton to select
the parameter's source, instead of the previous combo box approach
(which didn't scale well for large models). I.e. users select
first whether the value is taken from a static value, a
model input, or an output from a different child algorithm. The
widget then changes appearance and behavior based on this
choice.
Additionally, a new option is present for all parameters
of using a "precalculated expression". This expression is
evaluated once before the child algorithm is executed
and used during the execution of that algorithm.
- Add abstract base class for Processing widget wrappers to c++
- Add wrapper factory interface to c++
- Make QgsProcessingGuiRegistry also register widget wrapper
factories, and be responsible for creation of new c++
processing widget wrapper instances
- Start on private c++ implementation of boolean widget wrapper,
including unit tests
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.