TechDraw: modernize type checking
This commit is contained in:
@@ -67,7 +67,7 @@ App::DocumentObjectExecReturn *FeatureProjection::execute()
|
||||
App::DocumentObject* link = Source.getValue();
|
||||
if (!link)
|
||||
return new App::DocumentObjectExecReturn("No object linked");
|
||||
if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
|
||||
if (!link->isDerivedFrom<Part::Feature>())
|
||||
return new App::DocumentObjectExecReturn("Linked object is not a Part object");
|
||||
const TopoDS_Shape& shape = static_cast<Part::Feature*>(link)->Shape.getShape().getShape();
|
||||
if (shape.IsNull())
|
||||
|
||||
Reference in New Issue
Block a user