[QGIS-Developer] parameterAsEnumStrings always return default value

Andrea Giudiceandrea andreaerdna at libero.it
Fri Feb 24 08:37:19 PST 2023


Hi Nicolas,
I don't know if it is the intended behaviour, anyway it seems to me 
parameterAsEnumString and parameterAsEnumStrings return the correct 
value when |usesStaticStrings is set to True, while parameterAsEnum and 
parameterAsEnums when ||usesStaticStrings is set to False.

In addition, the parameter defaultValue should be set to a single value 
and not to a list if ||allowMultiple is set to False.

Best regards.

Andrea Giudiceandrea
|
Il 24/02/2023 14:11, Nicolas Godet via QGIS-Developer ha scritto:
> I noticed in a custom alg that `parameterAsEnumStrings` always return 
> the default value set in QgsProcessingParameterEnum.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20230224/2978a713/attachment.htm>


More information about the QGIS-Developer mailing list