diff options
author | Remco Burema <41987080+rburema@users.noreply.github.com> | 2019-11-07 19:23:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-07 19:23:28 +0300 |
commit | 00f505374b652e7692ccbdffd01ba9b704b612c0 (patch) | |
tree | 31e0e6a5928f2cb357b699fb51af7eb7658b4eb3 | |
parent | 19d334f35c7232e87f77e7de55126959bf5753d8 (diff) | |
parent | 3636eed96441e3c7e57bb1c519b7efb8e4c1bc37 (diff) |
Merge pull request #6637 from Ultimaker/CURA-6917_unlink_duplicated_material_44
Cura 6917 unlink duplicated material
-rw-r--r-- | cura/Settings/ContainerManager.py | 6 | ||||
-rw-r--r-- | resources/qml/Preferences/Materials/MaterialsView.qml | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 4a4a7b64dd..ff129d35e2 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -339,11 +339,11 @@ class ContainerManager(QObject): # \return A list of names of materials with the same GUID. @pyqtSlot("QVariant", bool, result = "QStringList") def getLinkedMaterials(self, material_node: "MaterialNode", exclude_self: bool = False) -> List[str]: - same_guid = ContainerRegistry.getInstance().findInstanceContainersMetadata(guid = material_node.guid) + same_guid = ContainerRegistry.getInstance().findInstanceContainersMetadata(GUID = material_node.guid) if exclude_self: - return [metadata["name"] for metadata in same_guid if metadata["base_file"] != material_node.base_file] + return list({meta["name"] for meta in same_guid if meta["base_file"] != material_node.base_file}) else: - return [metadata["name"] for metadata in same_guid] + return list({meta["name"] for meta in same_guid}) ## Unlink a material from all other materials by creating a new GUID # \param material_id \type{str} the id of the material to create a new GUID for. diff --git a/resources/qml/Preferences/Materials/MaterialsView.qml b/resources/qml/Preferences/Materials/MaterialsView.qml index f781497081..57253b9dff 100644 --- a/resources/qml/Preferences/Materials/MaterialsView.qml +++ b/resources/qml/Preferences/Materials/MaterialsView.qml @@ -46,7 +46,7 @@ TabView { return "" } - return linkedMaterials.join(", "); + return linkedMaterials; } function getApproximateDiameter(diameter) |