From f3d238fde85d2da52033407a68360e71d817b32e Mon Sep 17 00:00:00 2001 From: Florian Foinant-Willig Date: Sun, 15 Oct 2023 21:38:56 +0200 Subject: [PATCH] MeshPart: modernize type checking --- src/Mod/MeshPart/Gui/CurveOnMesh.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp index f4b9e194a3..7ae0b1c3b4 100644 --- a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp +++ b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp @@ -609,9 +609,7 @@ void CurveOnMeshHandler::Private::vertexCallback(void* ud, SoEventCallback* cb) CurveOnMeshHandler* self = static_cast(ud); if (!self->d_ptr->wireClosed) { Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(pp->getPath()); - if (vp - && vp->getTypeId().isDerivedFrom( - MeshGui::ViewProviderMesh::getClassTypeId())) { + if (vp && vp->isDerivedFrom()) { MeshGui::ViewProviderMesh* mesh = static_cast(vp); const SoDetail* detail = pp->getDetail(); @@ -653,9 +651,7 @@ void CurveOnMeshHandler::Private::vertexCallback(void* ud, SoEventCallback* cb) } } // try to 'complete' the curve - else if (vp - && vp->getTypeId().isDerivedFrom( - ViewProviderCurveOnMesh::getClassTypeId())) { + else if (vp && vp->isDerivedFrom()) { const SbVec3f& p = pp->getPoint(); if (self->tryCloseWire(p)) { self->closeWire();