diff options
-rw-r--r-- | cura/UI/PrintInformation.py | 16 | ||||
-rw-r--r-- | plugins/DigitalLibrary/src/DigitalFactoryController.py | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/cura/UI/PrintInformation.py b/cura/UI/PrintInformation.py index 9640326c91..2bbd12c69f 100644 --- a/cura/UI/PrintInformation.py +++ b/cura/UI/PrintInformation.py @@ -13,7 +13,8 @@ from UM.Qt.Duration import Duration from UM.Scene.SceneNode import SceneNode from UM.i18n import i18nCatalog from UM.MimeTypeDatabase import MimeTypeDatabase, MimeTypeNotFoundError -from UM.OutputDevice import OutputDevice +from UM.OutputDevice.OutputDevice import OutputDevice +from UM.OutputDevice.ProjectOutputDevice import ProjectOutputDevice if TYPE_CHECKING: from cura.CuraApplication import CuraApplication @@ -445,9 +446,10 @@ class PrintInformation(QObject): def _onOutputStart(self, output_device: OutputDevice) -> None: """If this is the sort of output 'device' (like local or online file storage, rather than a printer), the user could have altered the file-name, and thus the project name should be altered as well.""" - new_name = output_device.getLastOutputName() - if new_name is not None: - if len(os.path.dirname(new_name)) > 0: - self.setProjectName(new_name) - else: - self.setJobName(new_name) + if isinstance(output_device, ProjectOutputDevice): + new_name = output_device.getLastOutputName() + if new_name is not None: + if len(os.path.dirname(new_name)) > 0: + self.setProjectName(new_name) + else: + self.setJobName(new_name) diff --git a/plugins/DigitalLibrary/src/DigitalFactoryController.py b/plugins/DigitalLibrary/src/DigitalFactoryController.py index 8a91992c0a..e1b1c62172 100644 --- a/plugins/DigitalLibrary/src/DigitalFactoryController.py +++ b/plugins/DigitalLibrary/src/DigitalFactoryController.py @@ -604,7 +604,7 @@ class DigitalFactoryController(QObject): def _saveFileToSelectedProjectHelper(self, filename: str, formats: List[str]) -> None: # Indicate we have started sending a job (and propagate any user file name changes back to the open project) - self.uploadStarted.emit(filename) + 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"] |