TechDraw: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:03 +02:00
parent 0193e20b26
commit 24352a7f4c
22 changed files with 56 additions and 58 deletions

View File

@@ -183,7 +183,7 @@ DrawProjGroup* DrawProjGroupItem::getPGroup() const
{
std::vector<App::DocumentObject*> parent = getInList();
for (std::vector<App::DocumentObject*>::iterator it = parent.begin(); it != parent.end(); ++it) {
if ((*it)->getTypeId().isDerivedFrom(DrawProjGroup::getClassTypeId())) {
if ((*it)->isDerivedFrom<DrawProjGroup>()) {
DrawProjGroup* result = dynamic_cast<TechDraw::DrawProjGroup *>(*it);
return result;
}