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
This commit is contained in:
Konstantinos Karmas 2021-09-15 14:37:53 +02:00
parent 52c224c779
commit 6d9978e8f3

View file

@ -449,7 +449,4 @@ class PrintInformation(QObject):
if isinstance(output_device, ProjectOutputDevice): if isinstance(output_device, ProjectOutputDevice):
new_name = output_device.getLastOutputName() new_name = output_device.getLastOutputName()
if new_name is not None: if new_name is not None:
if len(os.path.dirname(new_name)) > 0: self.setJobName(os.path.splitext(os.path.basename(new_name))[0])
self.setProjectName(new_name)
else:
self.setJobName(new_name)