From 909a4156f3ccc64b86a3b0c4864b8c20fd5105e8 Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Wed, 21 Feb 2024 15:13:27 +0100 Subject: [PATCH] Updating _ucp_model to None everytime a write is done CURA-11403 --- plugins/3MFWriter/ThreeMFWorkspaceWriter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py index cff938788b..2536f5dacb 100644 --- a/plugins/3MFWriter/ThreeMFWorkspaceWriter.py +++ b/plugins/3MFWriter/ThreeMFWorkspaceWriter.py @@ -33,7 +33,7 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter): if self._ucp_model != model: self._ucp_model = model - def write(self, stream, nodes, mode=WorkspaceWriter.OutputMode.BinaryMode): + def _write(self, stream, nodes, mode=WorkspaceWriter.OutputMode.BinaryMode): application = Application.getInstance() machine_manager = application.getMachineManager() @@ -125,6 +125,11 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter): return True + def write(self, stream, nodes, mode=WorkspaceWriter.OutputMode.BinaryMode): + success = self._write(stream, nodes, mode=WorkspaceWriter.OutputMode.BinaryMode) + self._ucp_model = None + return success + @staticmethod def _writePluginMetadataToArchive(archive: zipfile.ZipFile) -> None: file_name_template = "%s/plugin_metadata.json"