Merge pull request #18744 from Ultimaker/CURA-8897_fix_revert_to_prev_project_name

[CURA-8897] Clear the last project name when the platform is empty.
This commit is contained in:
HellAholic 2024-03-28 10:34:52 +01:00 committed by GitHub
commit 55baebc5b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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:
self._platform_activity = True
else:
ProjectOutputDevice.setLastOutputName(None)
self._platform_activity = False
self.activityChanged.emit()
@pyqtSlot()