Skip to content

Commit

Permalink
FEM: material task panel, fix opening of material editor with materia…
Browse files Browse the repository at this point in the history
…l attributes without card
  • Loading branch information
berndhahnebach committed Jun 5, 2019
1 parent dd68022 commit 48f9ec3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Mod/Fem/femguiobjects/_ViewProviderFemMaterial.py
Expand Up @@ -359,7 +359,13 @@ def add_transient_material(self):
def edit_material(self):
# opens the material editor to choose a material or edit material params
import MaterialEditor
new_material_params = MaterialEditor.editMaterial(card_path=self.card_path)
if self.card_path not in self.cards:
FreeCAD.Console.PrintLog(
'Card path not in cards, material dict will be used to open Material Editor.\n'
)
new_material_params = MaterialEditor.editMaterial(material=self.material)
else:
new_material_params = MaterialEditor.editMaterial(card_path=self.card_path)
# material editor returns the mat_dict only, not a card_path
# if the material editor was canceled a empty dict will be returned
# do not change the self.material
Expand Down

0 comments on commit 48f9ec3

Please sign in to comment.