mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 22:23:57 -06: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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue