Reduce indentation by inverting input check

Reads a bit easier.

Contributes to issue CURA-4186.
This commit is contained in:
Ghostkeeper 2017-08-18 15:02:49 +02:00
parent 67cfb064e6
commit 4a788dfbdd
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -1,4 +1,4 @@
# Copyright (c) 2015 Ultimaker B.V.
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
import numpy
@ -306,9 +306,10 @@ class StartSliceJob(Job):
# \param message object_lists message to put the per object settings in
def _handlePerObjectSettings(self, node, message):
stack = node.callDecoration("getStack")
# Check if the node has a stack attached to it and the stack has any settings in the top container.
if stack:
# Check all settings for relations, so we can also calculate the correct values for dependant settings.
if not stack: # Check if the node has a stack attached to it and the stack has any settings in the top container.
return
# Check all settings for relations, so we can also calculate the correct values for dependent settings.
changed_setting_keys = set(stack.getTop().getAllKeys())
for key in stack.getTop().getAllKeys():
instance = stack.getTop().getInstance(key)