Skip to content

Commit

Permalink
FEM: Fix crash on missing unit when editing material second time
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF committed May 18, 2015
1 parent b7e7f1f commit b507505
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Mod/Fem/MechanicalMaterial.py
Expand Up @@ -167,7 +167,8 @@ def ym_changed(self, value):
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):
Expand Down

0 comments on commit b507505

Please sign in to comment.