mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Fix filtering maerials after editing materials
NB: previously the "approximate_diameter" metadata was stored as a number. This caused some issues passing arguments from QML to Python. Now "approximate_diameter" is stored as a string.
This commit is contained in:
parent
8f7471a892
commit
49f2fb2cea
7 changed files with 13 additions and 9 deletions
|
|
@ -310,9 +310,9 @@ class ExtruderManager(QObject):
|
|||
if preferred_material_id:
|
||||
global_stack = ContainerRegistry.getInstance().findContainerStacks(id = machine_id)
|
||||
if global_stack:
|
||||
approximate_material_diameter = round(global_stack[0].getProperty("material_diameter", "value"))
|
||||
approximate_material_diameter = str(round(global_stack[0].getProperty("material_diameter", "value")))
|
||||
else:
|
||||
approximate_material_diameter = round(machine_definition.getProperty("material_diameter", "value"))
|
||||
approximate_material_diameter = str(round(machine_definition.getProperty("material_diameter", "value")))
|
||||
|
||||
search_criteria = { "type": "material", "id": preferred_material_id, "approximate_diameter": approximate_material_diameter}
|
||||
if machine_definition.getMetaDataEntry("has_machine_materials"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue