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();