mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix perfered material search in auto-update
CURA-4708
This commit is contained in:
parent
80324900b0
commit
cbf6f55fd8
1 changed files with 2 additions and 1 deletions
|
@ -260,6 +260,7 @@ class MachineSettingsAction(MachineAction):
|
||||||
if not materials:
|
if not materials:
|
||||||
# Same material with new diameter is not found, search for generic version of the same material type
|
# Same material with new diameter is not found, search for generic version of the same material type
|
||||||
search_criteria.pop("supplier", None)
|
search_criteria.pop("supplier", None)
|
||||||
|
search_criteria.pop("brand", None)
|
||||||
search_criteria["color_name"] = "Generic"
|
search_criteria["color_name"] = "Generic"
|
||||||
materials = self._container_registry.findInstanceContainers(**search_criteria)
|
materials = self._container_registry.findInstanceContainers(**search_criteria)
|
||||||
if not materials:
|
if not materials:
|
||||||
|
@ -276,6 +277,6 @@ class MachineSettingsAction(MachineAction):
|
||||||
# Just use empty material as a final fallback
|
# Just use empty material as a final fallback
|
||||||
materials = [self._empty_container]
|
materials = [self._empty_container]
|
||||||
|
|
||||||
Logger.log("i", "Selecting new material: %s" % materials[0].getId())
|
Logger.log("i", "Selecting new material: %s", materials[0].getId())
|
||||||
|
|
||||||
extruder_stack.material = materials[0]
|
extruder_stack.material = materials[0]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue