[processing] make color parameter available to description-based algs

This commit is contained in:
Alexander Bruy 2019-07-09 06:13:44 +03:00
parent f6b5d5f8b3
commit 84c530b97b

View File

@ -56,7 +56,8 @@ from qgis.core import (QgsRasterLayer,
QgsProcessingParameterMapLayer,
QgsProcessingParameterMultipleLayers,
QgsProcessingParameterFeatureSource,
QgsProcessingParameterNumber)
QgsProcessingParameterNumber,
QgsProcessingParameterColor)
from qgis.PyQt.QtCore import QCoreApplication
@ -214,6 +215,11 @@ def getParameterFromString(s, context=''):
params[3] = True if params[3].lower() == 'true' else False
if len(params) > 4:
params[4] = True if params[4].lower() == 'true' else False
elif clazz == QgsProcessingParameterColor:
if len(params) > 3:
params[3] = True if params[3].lower() == 'true' else False
if len(params) > 4:
params[4] = True if params[4].lower() == 'true' else False
elif clazz == QgsProcessingParameterFileDestination:
if len(params) > 4:
params[4] = True if params[4].lower() == 'true' else False