Include extra extruder start/end.gcode in import
Prior to this change, start2.gcode, end2.gcode, start3.gcode, end3.gcode, etc. were ignored due to the index coming before the period. Fixes #1289
This commit is contained in:
parent
d8ea8efd68
commit
c433e32e6c
1 changed files with 5 additions and 2 deletions
|
|
@ -459,13 +459,16 @@ class Profile(object):
|
|||
index = None
|
||||
|
||||
for opt in arrayified_options:
|
||||
if key.startswith(opt):
|
||||
# if there's a period, the index comes before it
|
||||
optsplit = opt.split('.')
|
||||
keysplit = key.split('.')
|
||||
if key.startswith(optsplit[0]) and keysplit[1:] == optsplit[1:]:
|
||||
if key == opt:
|
||||
index = 0
|
||||
else:
|
||||
try:
|
||||
# try to convert the target index, e.g. print_temperature2 => print_temperature[1]
|
||||
index = int(key[len(opt):]) - 1
|
||||
index = int(keysplit[0][len(optsplit[0]):]) - 1
|
||||
except ValueError:
|
||||
# ignore entries for which that fails
|
||||
ignored = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue