From c3d6023418c4aed0c7b38258829d03456fa7b584 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 8 Sep 2017 16:22:45 +0200 Subject: [PATCH] Fixed an issue that doesn't generate the jobname again once the user removes the models. - CURA-4276 --- cura/PrintInformation.py | 3 ++- resources/qml/JobSpecs.qml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 26f9420120..83b5f4af69 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -265,7 +265,8 @@ class PrintInformation(QObject): # extension. This cuts the extension off if necessary. name = os.path.splitext(name)[0] - if self._base_name == "" and self._base_name != name: + # name is "" when I first had some meshes and afterwards I deleted them so the naming should start again + if name == "" or (self._base_name == "" and self._base_name != name): self._base_name = name self._updateJobName() diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 0f70022efc..3e5513621b 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -43,7 +43,7 @@ Item { } if (activity == false){ //When there is no mesh in the buildplate; the printJobTextField is set to an empty string so it doesn't set an empty string as a jobName (which is later used for saving the file) - PrintInformation.setJobName('') + PrintInformation.setBaseName('') } }