make mesh picking working for view providers underneath a Part container
This commit is contained in:
@@ -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<Gui::ViewProvider*>(view->getViewProviderByPath(point->getPath()));
|
||||
Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath());
|
||||
if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId()))
|
||||
return;
|
||||
ViewProviderMeshCurvature* self = static_cast<ViewProviderMeshCurvature*>(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<Gui::ViewProvider*>(view->getViewProviderByPath(point->getPath()));
|
||||
Gui::ViewProvider* vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath());
|
||||
if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId()))
|
||||
return;
|
||||
ViewProviderMeshCurvature* that = static_cast<ViewProviderMeshCurvature*>(vp);
|
||||
|
||||
Reference in New Issue
Block a user