Hello,

I develop a processing algorithm for the toolbox. One of my parameters a
list of vector layers of type line, so in my initAlgorithm function I have
this statement:

        self.addParameter(
            QgsProcessingParameterMultipleLayers(
                self.INPUT_LINES,
                self.tr("Lines"),
                QgsProcessing.TypeVectorLine,
                optional=False
            )
        )

However, even if the optional parameter is set to False, it seems the user
can still set an empty list: so not setting anything actually. So for me,
this optional parameter doesn't work in this case.

Am I missing something here or is it a bug ? In this last case, I can
report it on github. I'm using QGIS on Windows 3.10.2-A Coruña

Thanks,

Jean-Charles
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to