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

@@ -69,10 +69,10 @@ std::vector<App::DocumentObject*> ViewProviderAnnotation::claimChildren() const
try {
for (std::vector<App::DocumentObject*>::const_iterator it = views.begin();
it != views.end(); ++it) {
if ((*it)->getTypeId().isDerivedFrom(TechDraw::DrawViewBalloon::getClassTypeId())) {
if ((*it)->isDerivedFrom<TechDraw::DrawViewBalloon>()) {
temp.push_back((*it));
}
else if ((*it)->getTypeId().isDerivedFrom(TechDraw::DrawLeaderLine::getClassTypeId())) {
else if ((*it)->isDerivedFrom<TechDraw::DrawLeaderLine>()) {
temp.push_back((*it));
}
}