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:
fieldOfView 2017-05-30 16:55:01 +02:00 committed by Ghostkeeper
parent 8f7471a892
commit 49f2fb2cea
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75
7 changed files with 13 additions and 9 deletions

View file

@ -473,7 +473,7 @@ class XmlMaterialProfile(InstanceContainer):
if tag_name in self.__material_properties_setting_map:
common_setting_values[self.__material_properties_setting_map[tag_name]] = entry.text
meta_data["approximate_diameter"] = round(float(property_values.get("diameter", 2.85))) # In mm
meta_data["approximate_diameter"] = str(round(float(property_values.get("diameter", 2.85)))) # In mm
meta_data["properties"] = property_values
self.setDefinition(ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter")[0])