mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:09:08 +08: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
@ -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…
x
Reference in New Issue
Block a user