Part: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:38:52 +02:00
parent 1a83d18a8f
commit eb55f1fe52
22 changed files with 46 additions and 46 deletions

View File

@@ -152,7 +152,7 @@ void ShapeBuilderWidget::onSelectionChanged(const Gui::SelectionChanges& msg)
bool blocked = blockSelection(true);
App::Document* doc = App::GetApplication().getDocument(msg.pDocName);
App::DocumentObject* obj = doc->getObject(msg.pObjectName);
if (obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
if (obj->isDerivedFrom<Part::Feature>()) {
TopoDS_Shape myShape = static_cast<Part::Feature*>(obj)->Shape.getValue();
TopTools_IndexedMapOfShape all_faces;
TopExp::MapShapes(myShape, TopAbs_FACE, all_faces);