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

@@ -910,7 +910,7 @@ void QGSPage::findMissingViews(const std::vector<App::DocumentObject*>& list,
if (!hasQView(*it))
missing.push_back(*it);
if ((*it)->getTypeId().isDerivedFrom(TechDraw::DrawViewCollection::getClassTypeId())) {
if ((*it)->isDerivedFrom<TechDraw::DrawViewCollection>()) {
std::vector<App::DocumentObject*> missingChildViews;
TechDraw::DrawViewCollection* collection =
dynamic_cast<TechDraw::DrawViewCollection*>(*it);