FEM: Fix crash on missing unit when editing material second time

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt
2015-05-18 17:09:30 +01:00
parent dc0ab6f20e
commit 09652a0f46

View File

@@ -167,7 +167,8 @@ class _MechanicalMaterialTaskPanel:
old_ym = Units.Quantity(self.obj.Material['YoungsModulus'])
if old_ym != value:
material = self.obj.Material
material['YoungsModulus'] = unicode(value)
# FreeCAD uses kPa internall for Stress
material['YoungsModulus'] = unicode(value) + " kPa"
self.obj.Material = material
def pr_changed(self, value):