FEM: material task panel, fix unuseable Gui if material editor was canceled and material accepted

This commit is contained in:
Bernd Hahnebach
2021-03-21 23:18:44 +01:00
committed by GitHub
parent 2c114bee3f
commit 034397b1d2

View File

@@ -204,6 +204,10 @@ class _TaskPanel:
# 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