[QGIS-Developer] parameterAsEnumStrings always return default value

Nicolas Godet nicolas.godet at outlook.fr
Fri Feb 24 10:54:55 PST 2023


Hi Andrea,

Thanks for your reply.
The doc should reflect this weird (I believe) behavior.

Setting "usesStaticStrings=True" and "defaultValue="2023" and with parameterAsEnumString I have expected behavior but parameterAsEnum is broken...
Not easy...

I think I will fill an issue as the doc should should be more explicit or behavior fixed.




________________________________
De : QGIS-Developer <qgis-developer-bounces at lists.osgeo.org> de la part de Andrea Giudiceandrea via QGIS-Developer <qgis-developer at lists.osgeo.org>
Envoyé : vendredi 24 février 2023 17:50
À : qgis-developer at lists.osgeo.org <qgis-developer at lists.osgeo.org>
Objet : Re: [QGIS-Developer] parameterAsEnumStrings always return default value

Il 24/02/2023 17:37, Andrea Giudiceandrea ha scritto:
In addition, the parameter defaultValue should be set to a single value and not to a list if allowMultiple is set to False.
... and it should be populated with the index number (allowMultiple=False) or a list of index numbers (allowMultiple=True) when usesStaticStrings is set to False and with the value (allowMultiple=False) or a list of values (allowMultiple=True) when usesStaticStrings is set to True.

Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20230224/6868e0df/attachment-0001.htm>


More information about the QGIS-Developer mailing list