mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Add default for extruder position
The position argument metadata always be there. However if it's not (because the file is old, or manually modified, or a version upgrade worked incorrectly, or whatever) then we shouldn't crash. We just don't know how to order it correctly then. This tries to repair it as best it can.
This commit is contained in:
parent
79cc6ec897
commit
ffac9adb96
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
global_profile = profile
|
||||
else:
|
||||
extruder_profiles.append(profile)
|
||||
extruder_profiles = sorted(extruder_profiles, key = lambda x: int(x.getMetaDataEntry("position")))
|
||||
extruder_profiles = sorted(extruder_profiles, key = lambda x: int(x.getMetaDataEntry("position", default = "0")))
|
||||
profile_or_list = [global_profile] + extruder_profiles
|
||||
|
||||
if not global_profile:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue