Browse Source

CURA-5570 Fix the configuration sync feature.

It crashed Cura because it was using an outdated signature of the method
getMaterialNodeByType.
Diego Prado Gesto 6 years ago
parent
commit
825a3cd08f

+ 0 - 1
cura/Machines/MaterialManager.py

@@ -186,7 +186,6 @@ class MaterialManager(QObject):
             for root_material_id in data_dict.values():
                 self._diameter_material_map[root_material_id] = default_root_material_id
 
-
         # Map #4
         # "machine" -> "nozzle name" -> "buildplate name" -> "root material ID" -> specific material InstanceContainer
         self._diameter_machine_nozzle_buildplate_material_map = dict()

+ 0 - 1
cura/Machines/QualityManager.py

@@ -264,7 +264,6 @@ class QualityManager(QObject):
             # the list with priorities as the order. Later, we just need to loop over each node in this list and fetch
             # qualities from there.
             node_info_list_0 = [nozzle_name, buildplate_name, root_material_id]
-            current_node_info_idx = 0
             nodes_to_check = []
 
             # This function tries to recursively find the deepest (the most specific) branch and add those nodes to

+ 6 - 1
cura/Settings/MachineManager.py

@@ -1331,7 +1331,12 @@ class MachineManager(QObject):
             for extruder_configuration in configuration.extruderConfigurations:
                 position = str(extruder_configuration.position)
                 variant_container_node = self._variant_manager.getVariantNode(self._global_container_stack.definition.getId(), extruder_configuration.hotendID)
-                material_container_node = self._material_manager.getMaterialNodeByType(self._global_container_stack, position, extruder_configuration.hotendID, extruder_configuration.material.guid)
+                material_container_node = self._material_manager.getMaterialNodeByType(self._global_container_stack,
+                                                                                       position,
+                                                                                       extruder_configuration.hotendID,
+                                                                                       configuration.buildplateConfiguration,
+                                                                                       extruder_configuration.material.guid)
+
                 if variant_container_node:
                     self._setVariantNode(position, variant_container_node)
                 else: