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:
Mark Walker 2016-03-22 22:16:26 -07:00
parent d8ea8efd68
commit c433e32e6c

View file

@ -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