FEM: use new selection observer class for material reference shape selection

This commit is contained in:
Bernd Hahnebach
2015-11-09 07:35:48 +01:00
parent 025eac1e3d
commit c115dd74a4
4 changed files with 22 additions and 42 deletions

View File

@@ -93,15 +93,14 @@ class _TaskPanelFemShellThickness:
def selectionParser(self, selection):
# print('selection: ', selection[0].Shape.ShapeType, ' ', selection[0].Name, ' ', selection[1])
if hasattr(selection[0], "Shape"):
elt = selection[0].Shape.getElement(selection[1])
if elt.ShapeType == 'Face':
if selection not in self.references:
self.references.append(selection)
self.rebuild_list_References()
else:
print(selection[0].Name, '-->', selection[1], ' is already in reference list!')
else:
print('Selection has no shape!')
if selection[1]:
elt = selection[0].Shape.getElement(selection[1])
if elt.ShapeType == 'Face':
if selection not in self.references:
self.references.append(selection)
self.rebuild_list_References()
else:
print(selection[0].Name, '-->', selection[1], ' is already in reference list!')
def rebuild_list_References(self):
self.form.list_References.clear()