Material: comments

This commit is contained in:
Bernd Hahnebach
2021-07-15 00:06:29 +02:00
parent 800b96d25b
commit 323f323864
2 changed files with 11 additions and 0 deletions

View File

@@ -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()

View File

@@ -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.83e3 W/m/K')
checkvalueunit('ThermalConductivity', '25.83e-3 W/m/K')
from FreeCAD import Units
Units.Quantity('25.83e3 W/m/K')
# test mat unit properties
mat = {
'Name': 'Concrete',