From 3011a1792507668d030eb00ba08012f046d5157d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 27 Mar 2024 13:45:21 +0100 Subject: [PATCH 1/2] Clear last project name when platform empty. This should fix the reverting of project name to the previous one when the current project was not saved as a project (yet). CURA-8897 --- cura/CuraApplication.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 30497ce5f4..17dcb985be 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -33,6 +33,7 @@ from UM.Message import Message from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation from UM.Operations.SetTransformOperation import SetTransformOperation +from UM.OutputDevice.ProjectOutputDevice import ProjectOutputDevice from UM.Platform import Platform from UM.PluginError import PluginNotFoundError from UM.Preferences import Preferences @@ -1457,7 +1458,11 @@ class CuraApplication(QtApplication): self._scene_bounding_box = scene_bounding_box self.sceneBoundingBoxChanged.emit() - self._platform_activity = True if count > 0 else False + if count > 0: + ProjectOutputDevice.setLastOutputName(None) + self._platform_activity = True + else: + self._platform_activity = False self.activityChanged.emit() @pyqtSlot() From cbe3afba94a48e82196029875c33b4dec7feabc6 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 28 Mar 2024 08:48:01 +0100 Subject: [PATCH 2/2] Remove the name when there _isn't_ platform activity. Not the other way around, doh. part of CURA-8897 --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 17dcb985be..c8356e5727 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1459,9 +1459,9 @@ class CuraApplication(QtApplication): self.sceneBoundingBoxChanged.emit() if count > 0: - ProjectOutputDevice.setLastOutputName(None) self._platform_activity = True else: + ProjectOutputDevice.setLastOutputName(None) self._platform_activity = False self.activityChanged.emit()