FEM: material task panel, check for None instead of not

This commit is contained in:
Bernd Hahnebach
2019-02-02 22:27:27 +01:00
committed by Yorik van Havre
parent 976687ac66
commit 6bf8d8f34f

View File

@@ -281,10 +281,16 @@ class _TaskPanelFemMaterial:
# material parameter input fields *******************************
def print_material_params(self, material=None):
if not material:
# in rare cases we gone pass a empty dict
# in such a case a empty dict should be printed and not self.material thus we check for None
if material is None:
material = self.material
for p in material:
print(' ' + p + ' --> ' + material[p])
if not material:
# empty dict
print(' ' + str(material))
else:
for p in material:
print(' ' + p + ' --> ' + material[p])
print('\n')
def check_material_keys(self):