diff options
author | Ghostkeeper <rubend@tutanota.com> | 2021-09-10 17:46:39 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2021-09-10 17:46:39 +0300 |
commit | 9e2b556ce8f28294f9b44a3d8801af42043d3956 (patch) | |
tree | 996c4a575bc67fb03b4aae0b2fae672d46c8e97d /cura/UI | |
parent | daac6faaba98c31e77bb593369ee0399e8805efc (diff) |
Revert "Only change project name when saving to project files."
This reverts commit b97920e5b155caaab6a8b3bb167853a00ae4b604.
Diffstat (limited to 'cura/UI')
-rw-r--r-- | cura/UI/PrintInformation.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/cura/UI/PrintInformation.py b/cura/UI/PrintInformation.py index 2bbd12c69f..9640326c91 100644 --- a/cura/UI/PrintInformation.py +++ b/cura/UI/PrintInformation.py @@ -13,8 +13,7 @@ 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.OutputDevice import OutputDevice -from UM.OutputDevice.ProjectOutputDevice import ProjectOutputDevice +from UM.OutputDevice import OutputDevice if TYPE_CHECKING: from cura.CuraApplication import CuraApplication @@ -446,10 +445,9 @@ 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.""" - 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) + 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) |