Misc: Replace dynamic_cast with qobject_cast

This commit is contained in:
Kacper Donat
2025-04-07 20:00:08 +02:00
committed by Benjamin Nauck
parent 6c7c7a747d
commit e18c88bd23
10 changed files with 20 additions and 20 deletions

View File

@@ -1011,13 +1011,13 @@ Base::BoundBox3d ViewProvider::getBoundingBox(const char *subname, bool transfor
if(!view)
view = Application::Instance->activeView();
auto iview = dynamic_cast<View3DInventor*>(view);
auto iview = qobject_cast<View3DInventor*>(view);
if(!iview) {
auto doc = Application::Instance->activeDocument();
if(doc) {
auto views = doc->getMDIViewsOfType(View3DInventor::getClassTypeId());
if(!views.empty())
iview = dynamic_cast<View3DInventor*>(views.front());
iview = qobject_cast<View3DInventor*>(views.front());
}
if(!iview) {
FC_ERR("no view");