'Condition' parameter of the 'local' protocol parameter should reflect state of the 'global' protocol parameter #1770
Description
Is your feature request related to a problem? Please describe.
Let's say I have a protocol, which can execute both GPU and CPU implementation of an algorithm.
And let's assume that the GPU implementation has an additional parameter (e.g. max GPU memory that the algorithm can use).
Clearly, this additional parameter should not be visible for the CPU version.
Describe the solution you'd like
I would like to be able to specify condition on such a (local) parameter, using the USE_GPU (global) parameter.
Example (currently not working in devel-pluginization branch):
form.addHidden(params.USE_GPU, params.BooleanParam, default=False,
label="Use GPU version",
help="XXX")
form.addParam("max_gpu_mem", params.IntParam,
label='Max GPU memory to use',
condition="useGpu",
help="XXX")
Describe alternatives you've considered
Currently, I have decided to describe both in help and label that this parameter is for GPU version only.
Additional context
Note: Currently the condition sort of works, however, it is not interactive. It reflexts only the state of the global parameter at the time of instantiation (i.e. if I set the GPU version as a default, the memory parameter appears in the form, but it won't hide when I select CPU version).