mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Clarify global container stack checking code in _checkStacksHaveErrors
The order of operations was a bit weird. This made the code unclear and also required an extra check in an if-statement. This is simpler and theoretically even a bit faster. Contributes sorta to issue CURA-3291.
This commit is contained in:
parent
31e88aa5af
commit
7d536e2f8b
1 changed files with 4 additions and 4 deletions
|
@ -381,11 +381,11 @@ class MachineManager(QObject):
|
|||
return UM.Settings.ContainerRegistry.getInstance().createUniqueName(container_type, current_name, new_name, fallback_name)
|
||||
|
||||
def _checkStacksHaveErrors(self):
|
||||
if self._global_container_stack is not None and self._global_container_stack.hasErrors():
|
||||
return True
|
||||
|
||||
if self._global_container_stack is None:
|
||||
if self._global_container_stack is None: #No active machine.
|
||||
return False
|
||||
|
||||
if self._global_container_stack.hasErrors():
|
||||
return True
|
||||
stacks = list(ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId()))
|
||||
for stack in stacks:
|
||||
if stack.hasErrors():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue