CURA-4400 get setting type from definition instead of whole stack improves speed of this call by a factor of 10

This commit is contained in:
Jack Ha 2018-03-14 10:21:10 +01:00
parent ac9bd954df
commit 7ebd83f815

View file

@ -281,7 +281,7 @@ class StartSliceJob(Job):
default_extruder_position = int(Application.getInstance().getMachineManager().defaultExtruderPosition)
result = {}
for key in stack.getAllKeys():
setting_type = stack.getProperty(key, "type")
setting_type = stack.definition.getProperty(key, "type")
value = stack.getProperty(key, "value")
if setting_type == "extruder" and value == -1:
# replace with the default value