diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index 7c17987807..27c8c853b1 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -335,8 +335,15 @@ class PrintInformation(QObject): # name is "" when I first had some meshes and afterwards I deleted them so the naming should start again is_empty = name == "" if is_gcode or is_project_file or (is_empty or (self._base_name == "" and self._base_name != name)): - # Only take the file name part - self._base_name = filename_parts[0] + # Only take the file name part, Note : file name might have 'dot' in name as well + if is_project_file: + self._base_name = ".".join(filename_parts) + elif len(filename_parts) > 1: + self._base_name = ".".join(filename_parts[0:-1]) + else: + self._base_name = filename_parts[0] + + self._updateJobName() @pyqtProperty(str, fset = setBaseName, notify = baseNameChanged) diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 3238c66a1e..e7f2d304b5 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -19,18 +19,6 @@ Item { height: childrenRect.height - Connections - { - target: backgroundItem - onHasMesh: - { - if (PrintInformation.baseName == "") - { - PrintInformation.baseName = name; - } - } - } - onActivityChanged: { 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)