Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2019-08-12 17:36:43 +0300
committerGhostkeeper <rubend@tutanota.com>2019-08-12 17:49:57 +0300
commit1bd287f8885ed7a8e23aa50b45454bd4a54e29e3 (patch)
treeb888da63cde04303b602d83c4eeebde648949c66 /plugins/XmlMaterialProfile
parentb1fb843f094ca2a1722809b302895aae6e43f78a (diff)
Move getting variant manager out of the loop
This mostly just makes it easier for me to debug where the manager is obtained from the deprecated singleton signal. Contributes to issue CURA-6600.
Diffstat (limited to 'plugins/XmlMaterialProfile')
-rw-r--r--plugins/XmlMaterialProfile/XmlMaterialProfile.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py
index 241d1a954f..3e02f660d1 100644
--- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py
+++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py
@@ -608,6 +608,7 @@ class XmlMaterialProfile(InstanceContainer):
# Map machine human-readable names to IDs
product_id_map = self.getProductIdMap()
+ variant_manager = CuraApplication.getInstance().getVariantManager()
machines = data.iterfind("./um:settings/um:machine", self.__namespaces)
for machine in machines:
machine_compatibility = common_compatibility
@@ -702,7 +703,6 @@ class XmlMaterialProfile(InstanceContainer):
if buildplate_id is None:
continue
- variant_manager = CuraApplication.getInstance().getVariantManager()
variant_node = variant_manager.getVariantNode(machine_id, buildplate_id,
variant_type = VariantType.BUILD_PLATE)
if not variant_node:
@@ -725,7 +725,6 @@ class XmlMaterialProfile(InstanceContainer):
if hotend_name is None:
continue
- variant_manager = CuraApplication.getInstance().getVariantManager()
variant_node = variant_manager.getVariantNode(machine_id, hotend_name, VariantType.NOZZLE)
if not variant_node:
continue
@@ -777,7 +776,6 @@ class XmlMaterialProfile(InstanceContainer):
if buildplate_name is None:
continue
- variant_manager = CuraApplication.getInstance().getVariantManager()
variant_node = variant_manager.getVariantNode(machine_id, buildplate_name, VariantType.BUILD_PLATE)
if not variant_node:
continue