Switch early fail around to reduce indentation

Makes this more readable.

Contributes to issue CURA-6793.
This commit is contained in:
Ghostkeeper 2019-10-08 15:22:12 +02:00
parent b137e6a36d
commit dd8ee2e3d8
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -323,9 +323,10 @@ class ExtruderManager(QObject):
## Adds the extruders of the currently active machine. ## Adds the extruders of the currently active machine.
def _addCurrentMachineExtruders(self) -> None: def _addCurrentMachineExtruders(self) -> None:
global_stack = self._application.getGlobalContainerStack() global_stack = self._application.getGlobalContainerStack()
extruders_changed = False if not global_stack:
return
if global_stack: extruders_changed = False
container_registry = ContainerRegistry.getInstance() container_registry = ContainerRegistry.getInstance()
global_stack_id = global_stack.getId() global_stack_id = global_stack.getId()