mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 22:54:01 -06:00
Don't use limit_to_extruder if it evaluates to -1
The default value for the limit_to_extruder property is -1. So no need to check if the property exists. Just check if it is positive. Contributes to issue CURA-3291.
This commit is contained in:
parent
ed2b09c975
commit
362c5835ee
1 changed files with 3 additions and 4 deletions
|
@ -301,10 +301,9 @@ class MachineManager(QObject):
|
|||
if not self._stacks_have_errors:
|
||||
# fast update, we only have to look at the current changed property
|
||||
if self._active_container_stack.getProperty(key, "settable_per_extruder"):
|
||||
if self._active_container_stack.hasProperty(key, "limit_to_extruder"): #We have to look this value up from a different extruder.
|
||||
extruder_index = self._active_container_stack.getProperty(key, "limit_to_extruder")
|
||||
extruder_manager = ExtruderManager.getInstance()
|
||||
stack = extruder_manager.getExtruderStack(extruder_index)
|
||||
extruder_index = int(self._active_container_stack.getProperty(key, "limit_to_extruder"))
|
||||
if extruder_index >= 0: #We have to look up the value from a different extruder.
|
||||
stack = ExtruderManager.getInstance().getExtruderStack(str(extruder_index))
|
||||
else:
|
||||
stack = self._active_container_stack
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue