Skip to content

Commit

Permalink
Fem Workaround for choosing material data
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach committed Feb 26, 2015
1 parent fb908f6 commit d44d0fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Mod/Fem/MechanicalMaterial.py
Expand Up @@ -201,7 +201,7 @@ def goMatWeb(self):
webbrowser.open("http://matweb.com")

def chooseMat(self,index):
if index == 0:return
if index <= 0:return
import Material
#print index
name = self.pathList[index-1]
Expand All @@ -218,10 +218,14 @@ def fillMaterialCombo(self):
dirname = FreeCAD.ConfigGet("AppHomePath")+"data/Mod/Material/StandardMaterial"
self.pathList = glob.glob(dirname + '/*.FCMat')
self.form.comboBox_MaterialsInDir.clear()
if(matmap.has_key('General_name')):
'''if(matmap.has_key('General_name')):
self.form.comboBox_MaterialsInDir.addItem(matmap['General_name'])
else:
self.form.comboBox_MaterialsInDir.addItem('-> choose Material')
'''
# workaraound: since material data is not loaded into spinBoxes the user has
# to choose the material every time the MechanincalMaterialWidget is opened
self.form.comboBox_MaterialsInDir.addItem('-> choose Material')
for i in self.pathList:
self.form.comboBox_MaterialsInDir.addItem(os.path.basename(i) )

Expand Down

0 comments on commit d44d0fb

Please sign in to comment.