mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Force use and update the job name with the loaded project file
CURA-4348 - If no project is loaded beforehand and then a model file is loaded, the job name should be determined with the current machine name and the first loaded model name. - If a project is loaded, the job name should be the same as the project name, and it should not change until another project is loaded.
This commit is contained in:
parent
eaa7b75f0e
commit
052ea7d90a
4 changed files with 20 additions and 4 deletions
|
@ -26,6 +26,7 @@ from configparser import ConfigParser
|
|||
import zipfile
|
||||
import io
|
||||
import configparser
|
||||
import os
|
||||
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
|
@ -876,6 +877,11 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
|
|||
nodes = self._3mf_mesh_reader.read(file_name)
|
||||
if nodes is None:
|
||||
nodes = []
|
||||
|
||||
base_file_name = os.path.basename(file_name)
|
||||
if base_file_name.endswith(".curaproject.3mf"):
|
||||
base_file_name = base_file_name[:base_file_name.rfind(".curaproject.3mf")]
|
||||
Application.getInstance().projectFileLoaded.emit(base_file_name)
|
||||
return nodes
|
||||
|
||||
## HACK: Replaces the material container in the given stack with a newly created material container.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue