FEM: materials task panel, fix: if material editor was canceled the material params were set to 0

This commit is contained in:
Bernd Hahnebach
2019-02-01 09:51:30 +01:00
committed by Yorik van Havre
parent 211fba1244
commit ee851d777d

View File

@@ -242,9 +242,14 @@ class _TaskPanelFemMaterial:
# ********* how to edit a material *********
def edit_material(self):
# opens the material editor to choose a material or edit material params
# self.print_material_params()
import MaterialEditor
self.material = MaterialEditor.editMaterial(self.material)
new_material_params = self.material.copy()
MaterialEditor.editMaterial(new_material_params)
# if the material editor was canceled a empty params dict will be returned, do not change the self.material
if new_material_params is True:
self.material = new_material_params
self.check_material_keys()
self.set_mat_params_in_input_fields(self.material)
if self.has_transient_mat is False: