mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 16:03:14 +08: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
@ -785,7 +785,11 @@ class ContainerManager(QObject):
|
|||||||
for container_to_copy in containers_to_copy:
|
for container_to_copy in containers_to_copy:
|
||||||
#Create unique IDs for every clone.
|
#Create unique IDs for every clone.
|
||||||
current_id = container_to_copy.getId()
|
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:
|
if current_id == material_id:
|
||||||
clone_of_original = new_id
|
clone_of_original = new_id
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user