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-boun...@lists.osgeo.org> de la part de 
Andrea Giudiceandrea via QGIS-Developer <qgis-developer@lists.osgeo.org>
Envoyé : vendredi 24 février 2023 17:50
À : qgis-developer@lists.osgeo.org <qgis-developer@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
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to