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 b7e7f1f40a
commit b507505a47

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):