mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:55:57 +08:00
Project name after importing
CURA-5323
This commit is contained in:
parent
defb22dc07
commit
dfd9283ed5
@ -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…
x
Reference in New Issue
Block a user