TechDraw: modernize type checking

This commit is contained in:
Florian Foinant-Willig
2023-10-15 21:39:03 +02:00
parent 464ffa7e73
commit 1d8a51b47b
22 changed files with 56 additions and 58 deletions

View File

@@ -86,7 +86,7 @@ DrawPage* DrawTemplate::getParentPage() const
TechDraw::DrawPage* page(nullptr);
std::vector<App::DocumentObject*> parents = getInList();
for (auto& obj : parents) {
if (obj->getTypeId().isDerivedFrom(DrawPage::getClassTypeId())) {
if (obj->isDerivedFrom<DrawPage>()) {
page = static_cast<TechDraw::DrawPage *>(obj);
break;
}