From 21f1b12ee89e2924d2005892ee7d76b08e1e8114 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Mon, 31 Oct 2016 16:03:40 +0100 Subject: [PATCH 1/2] Internal docs. CURA-2852 Activating customised material will not duplicate UM2+ profiles --- cura/QualityManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/QualityManager.py b/cura/QualityManager.py index 8918b818f1..0b4353442e 100644 --- a/cura/QualityManager.py +++ b/cura/QualityManager.py @@ -27,7 +27,7 @@ class QualityManager: # specified then the currently selected machine definition is used. # \param material_containers (Optional) \type{List[ContainerInstance]} If nothing is specified then # the current set of selected materials is used. - # \return the matching quality containers \type{List[ContainerInstance]} + # \return the matching quality container \type{ContainerInstance} def findQualityByName(self, quality_name, machine_definition=None, material_containers=None): criteria = {"type": "quality", "name": quality_name} result = self._getFilteredContainersForStack(machine_definition, material_containers, **criteria) From 48b57de6dfc43552ec11dd71ccd7e477ef91527d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 31 Oct 2016 17:26:27 +0100 Subject: [PATCH 2/2] Filter materials on compatibility for non-machine-specific materials This only listens to whether the 'base' XML profile is marked as compatible in its metadata, but since the machine doesn't have its own materials, the base is the only one that exists. This needs to be changed when we change the filtering on fdmprinter, hence the comment in the code. Contributes to issue CURA-2837. --- resources/qml/Menus/MaterialMenu.qml | 1 + resources/qml/Preferences/MaterialsPage.qml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index 534be456ed..573dff89dd 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -153,6 +153,7 @@ Menu else { result.definition = "fdmprinter"; + result.compatible = true; //NB: Only checks for compatibility in global version of material, but we don't have machine-specific materials anyway. } return result; } diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index 8ba26b6ac3..83f980bf86 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -29,7 +29,8 @@ UM.ManagementPage } else { - result.definition = "fdmprinter" + result.definition = "fdmprinter"; + result.compatible = true; //NB: Only checks for compatibility in global version of material, but we don't have machine-specific materials anyway. } return result }