mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Reconstruct ID for submaterials from unique base name
When you make the ID of the subprofile unique it doesn't get linked to the base profile any more since the '#2' gets put at the end. Contributes to issue CURA-4243.
This commit is contained in:
parent
bc28189ff5
commit
72c7d2bd76
1 changed files with 5 additions and 1 deletions
|
@ -785,7 +785,11 @@ class ContainerManager(QObject):
|
|||
for container_to_copy in containers_to_copy:
|
||||
#Create unique IDs for every clone.
|
||||
current_id = container_to_copy.getId()
|
||||
new_id = self._container_registry.uniqueName(current_id)
|
||||
new_id = new_base_id
|
||||
if container_to_copy.getMetaDataEntry("definition") != "fdmprinter":
|
||||
new_id += "_" + container_to_copy.getMetaDataEntry("definition")
|
||||
if container_to_copy.getMetaDataEntry("variant"):
|
||||
new_id += "_" + container_to_copy.getMetaDataEntry("variant")
|
||||
if current_id == material_id:
|
||||
clone_of_original = new_id
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue