From d49ba8011775957eebc63f17aed808216629da1b Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Fri, 24 Jun 2016 16:00:38 +0200 Subject: [PATCH] GCodeWriter: Getting always the correct container with the currently used profile. --- plugins/GCodeWriter/GCodeWriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index c80d8e610a..4eb1f89134 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -69,8 +69,8 @@ class GCodeWriter(MeshWriter): prefix_length = len(prefix) global_stack = Application.getInstance().getGlobalContainerStack() - container_with_settings = global_stack.getContainers()[1] - serialized = container_with_settings.serialize() + container_with_profile = global_stack.findContainer({"type": "quality"}) + serialized = container_with_profile.serialize() # Escape characters that have a special meaning in g-code comments. pattern = re.compile("|".join(GCodeWriter.escape_characters.keys()))