From 9d78c9ed5860de5b94f4a5c301cd9003edd86132 Mon Sep 17 00:00:00 2001 From: "c.lamboo" Date: Mon, 15 Jan 2024 12:39:10 +0100 Subject: [PATCH] Don't mutate/pollute `_all_extruder_settings` with additional values CURA-11536 --- plugins/CuraEngineBackend/StartSliceJob.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 04345bf747..5039e9a3de 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -109,10 +109,10 @@ class GcodeStartEndFormatter(Formatter): extruder_nr = self._all_extruder_settings["-1"].get(extruder_nr_expr, "-1") if extruder_nr in self._all_extruder_settings: - additional_variables = self._all_extruder_settings[extruder_nr] + additional_variables = self._all_extruder_settings[extruder_nr].copy() else: Logger.warning(f"Extruder {extruder_nr} does not exist, using global settings") - additional_variables = self._all_extruder_settings["-1"] + additional_variables = self._all_extruder_settings["-1"].copy() # Add the arguments and keyword arguments to the additional settings. These # are currently _not_ used, but they are added for consistency with the