mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
CURA-4400 merge two if statements in 1
This commit is contained in:
parent
5135a972a2
commit
0d61b6652c
1 changed files with 1 additions and 4 deletions
|
@ -722,12 +722,9 @@ class MachineManager(QObject):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
old_value = self._global_container_stack.userChanges.getProperty(setting_key, "value")
|
old_value = self._global_container_stack.userChanges.getProperty(setting_key, "value")
|
||||||
if int(old_value) >= extruder_count:
|
if int(old_value) >= extruder_count or not self._global_container_stack.extruders[str(old_value)].isEnabled:
|
||||||
self._global_container_stack.userChanges.removeInstance(setting_key)
|
self._global_container_stack.userChanges.removeInstance(setting_key)
|
||||||
Logger.log("d", "Reset setting [%s] because its old value [%s] is no longer valid", setting_key, old_value)
|
Logger.log("d", "Reset setting [%s] because its old value [%s] is no longer valid", setting_key, old_value)
|
||||||
if not self._global_container_stack.extruders[str(old_value)].isEnabled:
|
|
||||||
self._global_container_stack.userChanges.removeInstance(setting_key)
|
|
||||||
Logger.log("d", "Reset setting [%s] because its old value [%s] is no longer valid (2)", setting_key, old_value)
|
|
||||||
|
|
||||||
## Set the amount of extruders on the active machine (global stack)
|
## Set the amount of extruders on the active machine (global stack)
|
||||||
# \param extruder_count int the number of extruders to set
|
# \param extruder_count int the number of extruders to set
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue