Surface: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:10 +02:00
parent 24934d7843
commit bb3eb31d4e
9 changed files with 13 additions and 13 deletions

View File

@@ -368,7 +368,7 @@ void FillingEdgePanel::onListUnboundItemDoubleClicked(QListWidgetItem* item)
try {
App::Document* doc = App::GetApplication().getDocument(data[0].toByteArray());
App::DocumentObject* obj = doc ? doc->getObject(data[1].toByteArray()) : nullptr;
if (obj && obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
if (obj && obj->isDerivedFrom<Part::Feature>()) {
const Part::TopoShape& shape = static_cast<Part::Feature*>(obj)->Shape.getShape();
TopoDS_Shape edge = shape.getSubShape(data[2].toByteArray());