File tree 1 file changed +10
-2
lines changed
python/plugins/processing/core
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ def getParameterFromString(s):
118
118
params [5 ] = True if params [5 ].lower () == 'true' else False
119
119
elif clazz == QgsProcessingParameterFeatureSource :
120
120
if len (params ) > 2 :
121
- params [2 ] = [int (p ) for p in params [2 ].split (';' )]
121
+ try :
122
+ params [2 ] = [int (p ) for p in params [2 ].split (';' )]
123
+ except :
124
+ params [2 ] = [getattr (QgsProcessing , p .split ("." )[1 ]) for p in params [2 ].split (';' )]
122
125
if len (params ) > 4 :
123
126
params [4 ] = True if params [4 ].lower () == 'true' else False
124
127
elif clazz == QgsProcessingParameterMultipleLayers :
@@ -136,9 +139,14 @@ def getParameterFromString(s):
136
139
params [3 ] = True if params [3 ].lower () == 'true' else False
137
140
if len (params ) > 4 :
138
141
params [4 ] = params [4 ].split (';' )
142
+ if len (params ) > 6 :
143
+ params [6 ] = True if params [6 ].lower () == 'true' else False
139
144
elif clazz == QgsProcessingParameterField :
140
145
if len (params ) > 4 :
141
- params [4 ] = int (params [4 ])
146
+ try :
147
+ params [4 ] = int (params [4 ])
148
+ except :
149
+ params [4 ] = getattr (QgsProcessingParameterField , params [4 ].split ("." )[1 ])
142
150
if len (params ) > 5 :
143
151
params [5 ] = True if params [5 ].lower () == 'true' else False
144
152
if len (params ) > 6 :
You can’t perform that action at this time.
0 commit comments