diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp index 83ec11beec..e02eba102f 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp @@ -485,7 +485,7 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) n->setHandled(); // check if we have picked one a node of the view provider we are insterested in - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(point->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (vp && vp->getTypeId().isDerivedFrom(ViewProviderInspection::getClassTypeId())) { ViewProviderInspection* that = static_cast(vp); QString info = that->inspectDistance(point); @@ -505,7 +505,7 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) const SoPickedPointList& pps = action.getPickedPointList(); for (int i=0; i(view->getViewProviderByPath(point->getPath())); + vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (vp && vp->getTypeId().isDerivedFrom(ViewProviderInspection::getClassTypeId())) { ViewProviderInspection* that = static_cast(vp); QString info = that->inspectDistance(point); diff --git a/src/Mod/Mesh/Gui/MeshSelection.cpp b/src/Mod/Mesh/Gui/MeshSelection.cpp index 8811efdee1..b931639f38 100644 --- a/src/Mod/Mesh/Gui/MeshSelection.cpp +++ b/src/Mod/Mesh/Gui/MeshSelection.cpp @@ -538,7 +538,7 @@ void MeshSelection::pickFaceCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(point->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) return; ViewProviderMesh* mesh = static_cast(vp); diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index 9cb1020c40..eeb8b2329b 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -1525,7 +1525,7 @@ void ViewProviderMesh::faceInfoCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(point->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) return; @@ -1599,7 +1599,7 @@ void ViewProviderMesh::fillHoleCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(point->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) return; ViewProviderMesh* that = static_cast(vp); @@ -1666,7 +1666,7 @@ void ViewProviderMesh::markPartCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(point->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) return; ViewProviderMesh* that = static_cast(vp); diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp index 8261ecc8a7..be29378ecc 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp @@ -510,7 +510,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void * ud, SoEventCallback // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(point->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId())) return; ViewProviderMeshCurvature* self = static_cast(vp); @@ -545,7 +545,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void * ud, SoEventCallback // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(point->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath()); if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId())) return; ViewProviderMeshCurvature* that = static_cast(vp); diff --git a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp index 7cec633a34..6137e23a95 100644 --- a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp +++ b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp @@ -600,7 +600,7 @@ void CurveOnMeshHandler::Private::vertexCallback(void * ud, SoEventCallback * n) if (pp) { CurveOnMeshHandler* self = static_cast(ud); if (!self->d_ptr->wireClosed) { - Gui::ViewProvider* vp = static_cast(view->getViewProviderByPath(pp->getPath())); + Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(pp->getPath()); if (vp && vp->getTypeId().isDerivedFrom(MeshGui::ViewProviderMesh::getClassTypeId())) { MeshGui::ViewProviderMesh* mesh = static_cast(vp); const SoDetail* detail = pp->getDetail();