Skip to content

Commit

Permalink
[processing] make color parameter available to description-based algs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jul 9, 2019
1 parent f6b5d5f commit 84c530b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/plugins/processing/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
QgsProcessingParameterMapLayer,
QgsProcessingParameterMultipleLayers,
QgsProcessingParameterFeatureSource,
QgsProcessingParameterNumber)
QgsProcessingParameterNumber,
QgsProcessingParameterColor)

from qgis.PyQt.QtCore import QCoreApplication

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 84c530b

Please sign in to comment.