mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Prevent infinite recursion relating to limit_to_extruder
With limit_to_extruder, we always try to get the value of a setting from an extruder. However, if the setting is not settable_per_extruder we bypass the extruder and go directly to the global stack. This would cause an infinite recursion. Contributes to CURA-3738
This commit is contained in:
parent
c4e6336828
commit
02f0418889
1 changed files with 6 additions and 3 deletions
|
@ -82,9 +82,12 @@ class GlobalStack(CuraContainerStack):
|
|||
# Handle the "limit_to_extruder" property.
|
||||
limit_to_extruder = super().getProperty(key, "limit_to_extruder")
|
||||
if limit_to_extruder is not None and limit_to_extruder != "-1":
|
||||
result = self._extruders[int(limit_to_extruder)].getProperty(key, property_name)
|
||||
if result is not None:
|
||||
return result
|
||||
if super().getProperty(key, "settable_per_extruder"):
|
||||
result = self._extruders[int(limit_to_extruder)].getProperty(key, property_name)
|
||||
if result is not None:
|
||||
return result
|
||||
else:
|
||||
Logger.log("e", "Setting {setting} has limit_to_extruder but is not settable per extruder!", setting = key)
|
||||
|
||||
return super().getProperty(key, property_name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue