Fem: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:02 +02:00
parent 1d8a51b47b
commit 027ac1b456
10 changed files with 26 additions and 30 deletions

View File

@@ -930,7 +930,7 @@ void ViewProviderFemPostObject::hide()
App::DocumentObject* firstVisiblePostObject = nullptr;
// step through the objects
for (auto it : ObjectsList) {
if (it->getTypeId().isDerivedFrom(Fem::FemPostObject::getClassTypeId())) {
if (it->isDerivedFrom<Fem::FemPostObject>()) {
if (!firstVisiblePostObject && it->Visibility.getValue()
&& !it->isDerivedFrom(Fem::FemPostDataAtPointFilter::getClassTypeId())) {
firstVisiblePostObject = it;