mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:59:01 +08:00
Correct variant name when duplicating materials
It needs to be the variant name (swapping spaces for underscores) to be consistent with the deserialize functions. Contributes to issue CURA-4243.
This commit is contained in:
parent
3e2e133682
commit
80f4c9181d
@ -789,7 +789,8 @@ class ContainerManager(QObject):
|
||||
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")
|
||||
variant = self._container_registry.findContainers(id = container_to_copy.getMetaDataEntry("variant"))[0]
|
||||
new_id += "_" + variant.getName().replace(" ", "_")
|
||||
if current_id == material_id:
|
||||
clone_of_original = new_id
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user