From 6d9978e8f3ca07541096cc36498c3adface76c84 Mon Sep 17 00:00:00 2001 From: Konstantinos Karmas Date: Wed, 15 Sep 2021 14:37:53 +0200 Subject: [PATCH] Always set the project name as the one provided by the user There was an inconsistent behavior between saving a project file to disk (where the printer short name was readded after saving) and saving to the DigitalLibrary (where the printer short was NOT added again). This commit fixes that by making sure that whatever the user put as the name of the file, will be the name of the project within Cura. CURA-8566 --- cura/UI/PrintInformation.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cura/UI/PrintInformation.py b/cura/UI/PrintInformation.py index 2bbd12c69f..2135c6fe81 100644 --- a/cura/UI/PrintInformation.py +++ b/cura/UI/PrintInformation.py @@ -449,7 +449,4 @@ class PrintInformation(QObject): 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) + self.setJobName(os.path.splitext(os.path.basename(new_name))[0])