mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-30 22:31:21 -07:00
Project name after importing
CURA-5323
This commit is contained in:
parent
defb22dc07
commit
dfd9283ed5
1 changed files with 5 additions and 1 deletions
|
|
@ -337,12 +337,16 @@ class PrintInformation(QObject):
|
|||
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, Note : file name might have 'dot' in name as well
|
||||
if is_project_file:
|
||||
# This is for .curaproject
|
||||
# This is for .curaproject, loaded as project
|
||||
self._base_name = ".".join(filename_parts)
|
||||
elif len(filename_parts) > 1:
|
||||
if "gcode" in filename_parts:
|
||||
gcode_index = filename_parts.index('gcode')
|
||||
self._base_name = ".".join(filename_parts[0:gcode_index])
|
||||
elif "curaproject" in filename_parts:
|
||||
#load a project and import only models
|
||||
curaproject_index = filename_parts.index('curaproject')
|
||||
self._base_name = ".".join(filename_parts[0:curaproject_index])
|
||||
else:
|
||||
self._base_name = name
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue