diff --git a/src/Mod/Material/MaterialEditor.py b/src/Mod/Material/MaterialEditor.py index a058ac440e..c3db367b64 100644 --- a/src/Mod/Material/MaterialEditor.py +++ b/src/Mod/Material/MaterialEditor.py @@ -633,6 +633,7 @@ class MaterialsDelegate(QtGui.QStyledItemDelegate): Type = editor.property('Type') model = index.model() item = model.itemFromIndex(index) + print("item1={}".format(item.text())) if Type == "Color": @@ -648,6 +649,7 @@ class MaterialsDelegate(QtGui.QStyledItemDelegate): else: super(MaterialsDelegate, self).setEditorData(editor, index) + print("item2={}".format(item.text())) ui = FreeCADGui.UiLoader() diff --git a/src/Mod/Material/materialtools/cardutils.py b/src/Mod/Material/materialtools/cardutils.py index 29afb305f9..2518bdc4e6 100644 --- a/src/Mod/Material/materialtools/cardutils.py +++ b/src/Mod/Material/materialtools/cardutils.py @@ -729,6 +729,15 @@ checkvalueunit('FractureToughness', '25') checkvalueunit('Density', '1 kg/m^3') checkvalueunit('Density', '0 kg/m^3') +# syntax error in unit system, only the try: except in the checkvalueunit let it work +checkvalueunit('ThermalConductivity', '0.02583 W/m/K') +checkvalueunit('ThermalConductivity', '123abc456 W/m/K') +checkvalueunit('ThermalConductivity', '25.83e−3 W/m/K') +checkvalueunit('ThermalConductivity', '25.83e-3 W/m/K') +from FreeCAD import Units +Units.Quantity('25.83e−3 W/m/K') + + # test mat unit properties mat = { 'Name': 'Concrete',