CURA-5249 replaced the extruder value of -1 by the more explicit defaultExtruderPosition, so now Cura is aware of the actual extruder position being used. Fixes linked icon next to support settings, like support_angle.

This commit is contained in:
Jack Ha 2018-06-06 11:00:09 +02:00
parent 70d78f3cab
commit 17b127e8c1
5 changed files with 9 additions and 15 deletions

View file

@ -287,14 +287,9 @@ class StartSliceJob(Job):
# \return A dictionary of replacement tokens to the values they should be
# replaced with.
def _buildReplacementTokens(self, stack) -> dict:
default_extruder_position = int(Application.getInstance().getMachineManager().defaultExtruderPosition)
result = {}
for key in stack.getAllKeys():
setting_type = stack.definition.getProperty(key, "type")
value = stack.getProperty(key, "value")
if setting_type == "extruder" and value == -1:
# replace with the default value
value = default_extruder_position
result[key] = value
Job.yieldThread()