diff --git a/plugins/DigitalLibrary/src/DigitalFactoryController.py b/plugins/DigitalLibrary/src/DigitalFactoryController.py index b94f0e69c8..e1b1c62172 100644 --- a/plugins/DigitalLibrary/src/DigitalFactoryController.py +++ b/plugins/DigitalLibrary/src/DigitalFactoryController.py @@ -603,8 +603,8 @@ class DigitalFactoryController(QObject): self._saveFileToSelectedProjectHelper(filename, formats) def _saveFileToSelectedProjectHelper(self, filename: str, formats: List[str]) -> None: - # Indicate we have started sending a job. - self.uploadStarted.emit() + # Indicate we have started sending a job (and propagate any user file name changes back to the open project) + self.uploadStarted.emit(filename if "3mf" in formats else None) library_project_id = self._project_model.items[self._selected_project_idx]["libraryProjectId"] library_project_name = self._project_model.items[self._selected_project_idx]["displayName"] diff --git a/plugins/DigitalLibrary/src/DigitalFactoryOutputDevice.py b/plugins/DigitalLibrary/src/DigitalFactoryOutputDevice.py index 70e3ac34f2..82caab7d50 100644 --- a/plugins/DigitalLibrary/src/DigitalFactoryOutputDevice.py +++ b/plugins/DigitalLibrary/src/DigitalFactoryOutputDevice.py @@ -8,6 +8,8 @@ from UM.Logger import Logger from UM.OutputDevice import OutputDeviceError from UM.OutputDevice.ProjectOutputDevice import ProjectOutputDevice from UM.Scene.SceneNode import SceneNode +from UM.Version import Version +from cura import ApplicationMetadata from cura.API import Account from cura.CuraApplication import CuraApplication from .DigitalFactoryController import DigitalFactoryController @@ -105,8 +107,11 @@ class DigitalFactoryOutputDevice(ProjectOutputDevice): self.enabled = logged_in and self._controller.userAccountHasLibraryAccess() self.enabledChanged.emit() - def _onWriteStarted(self) -> None: + def _onWriteStarted(self, new_name: Optional[str] = None) -> None: self._writing = True + if new_name and Version(ApplicationMetadata.CuraSDKVersion) >= Version("7.7.0"): + # setLastOutputName is only supported sdk version 7.7.0 and up + self.setLastOutputName(new_name) self.writeStarted.emit(self) def _onWriteFinished(self) -> None: