Skip to content

Commit

Permalink
FEM: material task panel, fix assignment and cancel by material editor
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Feb 5, 2019
1 parent db9b125 commit eba3b95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mod/Fem/femguiobjects/_ViewProviderFemMaterial.py
Expand Up @@ -246,9 +246,10 @@ def edit_material(self):
# self.print_material_params()
import MaterialEditor
new_material_params = self.material.copy()
MaterialEditor.editMaterial(new_material_params)
new_material_params = 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.print_material_params(new_material_params)
if new_material_params: # returns True if dict is not empty (do not use 'is True', this would return False for a non empty dict)
self.material = new_material_params
self.check_material_keys()
self.set_mat_params_in_input_fields(self.material)
Expand Down

0 comments on commit eba3b95

Please sign in to comment.