@@ -43,6 +43,7 @@ class ParameterEntry:
43
43
Name : str
44
44
sValue : str
45
45
Comment : Optional [str ] = None
46
+ raw_entry : Optional [str ] = None
46
47
47
48
48
49
@dataclass
@@ -373,13 +374,17 @@ def default_parameter_value_message(new_val: Any, param_to_modify_name: str, def
373
374
# All is good. With a list, we have to use the last character of the Description to get the position.
374
375
# I.e., "Gradient 1" should yield a position = 0 ("1" - 1)
375
376
else :
376
- parts = ParameterReadIn .Name .split (' ' )
377
- position = int (parts [1 ]) - 1
378
- if position >= len (ParamToModify .value ):
379
- ParamToModify .value .append (New_val ) # we are adding to the list, so use append
380
- else : # we are replacing a value, so pop the value we want to replace, then insert a new one
381
- ParamToModify .value .pop (position )
382
- ParamToModify .value .insert (position , New_val )
377
+ if ' ' in ParamToModify .Name :
378
+ parts = ParameterReadIn .Name .split (' ' )
379
+ position = int (parts [1 ]) - 1
380
+ if position >= len (ParamToModify .value ):
381
+ ParamToModify .value .append (New_val ) # we are adding to the list, so use append
382
+ else : # we are replacing a value, so pop the value we want to replace, then insert a new one
383
+ ParamToModify .value .pop (position )
384
+ ParamToModify .value .insert (position , New_val )
385
+ else :
386
+ ParamToModify .value = [float (x .strip ()) for x in ParameterReadIn .raw_entry .split ('--' )[0 ].split (',' )[1 :]
387
+ if x .strip () != '' ]
383
388
elif isinstance (ParamToModify , boolParameter ):
384
389
if ParameterReadIn .sValue == "0" :
385
390
New_val = False
0 commit comments