When sending per object settings, we now also check if we need to send anything at all

Adding a setting and then removing it caused some weird behavior issues CURA-1988
This commit is contained in:
Jaime van Kessel 2016-07-28 15:26:59 +02:00
parent 4b9a78624d
commit 467f971dac

View file

@ -211,7 +211,9 @@ class StartSliceJob(Job):
def _handlePerObjectSettings(self, node, message):
stack = node.callDecoration("getStack")
if stack:
# Check if the node has a stack attached to it and the stack has any settings in the top container.
if stack and stack.getTop().getAllKeys():
# Because we want to use inheritance correctly, we send all settings as seen from the per object stack.
for key in stack.getAllKeys():
setting = message.addRepeatedMessage("settings")
setting.name = key