Skip to content

Commit

Permalink
FEM: material task panel, fix unuseable Gui if material editor was ca…
Browse files Browse the repository at this point in the history
…nceled and material accepted
  • Loading branch information
berndhahnebach committed Mar 21, 2021
1 parent 28e40ff commit 011cef1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mod/Fem/femtaskpanels/task_material_common.py
Expand Up @@ -204,6 +204,10 @@ def __init__(self, obj):
# leave task panel ***************************************************************************
def accept(self):
# print(self.material)
if self.material == {}: # happens if material editor was canceled
FreeCAD.Console.PrintError("Empty material dictionary, nothing was changed.\n")
self.recompute_and_set_back_all()
return True
if self.selectionWidget.has_equal_references_shape_types():
self.do_not_set_thermal_zeros()
from materialtools.cardutils import check_mat_units as checkunits
Expand Down

0 comments on commit 011cef1

Please sign in to comment.