FEM: Use chooseMat directly set set initial value for material

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
Przemo Firszt 2015-04-09 15:17:24 +01:00 committed by wmayer
parent 9a9f7e64a5
commit 7cb4df59f7

View File

@ -139,8 +139,7 @@ class _MechanicalMaterialTaskPanel:
material_name = matmap['General_name']
new_index = self.form.comboBox_MaterialsInDir.findText(material_name)
if new_index != -1:
self.form.comboBox_MaterialsInDir.setCurrentIndex(new_index)
self.set_mat_params_in_combo_box(matmap)
self.chooseMat(new_index)
else:
print "Cannot find previously used material \'{}\' - setting to \'None\'".format(material_name)
i = self.form.comboBox_MaterialsInDir.findText('None')