[skip ci] tmp. disable selection when switching to curvature or inspection info modus
This commit is contained in:
@@ -89,6 +89,7 @@ void CmdInspectElement::activated(int)
|
||||
viewer->setEditing(true);
|
||||
viewer->setRedirectToSceneGraphEnabled(true);
|
||||
viewer->setRedirectToSceneGraph(true);
|
||||
viewer->setSelectionEnabled(false);
|
||||
viewer->setEditingCursor(QCursor(Gui::BitmapFactory().pixmapFromSvg("inspect_pipette",QSize(32,32)),4,29));
|
||||
viewer->addEventCallback(SoButtonEvent::getClassTypeId(),
|
||||
InspectionGui::ViewProviderInspection::inspectCallback);
|
||||
|
||||
@@ -473,6 +473,7 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n)
|
||||
view->getWidget()->setCursor(QCursor(Qt::ArrowCursor));
|
||||
view->setRedirectToSceneGraph(false);
|
||||
view->setRedirectToSceneGraphEnabled(false);
|
||||
view->setSelectionEnabled(true);
|
||||
view->removeEventCallback(SoButtonEvent::getClassTypeId(), inspectCallback, ud);
|
||||
}
|
||||
}
|
||||
@@ -508,8 +509,8 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n)
|
||||
const SoPickedPoint * point = pps[i];
|
||||
vp = view->getDocument()->getViewProviderByPathFromTail(point->getPath());
|
||||
if (vp && vp->getTypeId().isDerivedFrom(ViewProviderInspection::getClassTypeId())) {
|
||||
ViewProviderInspection* that = static_cast<ViewProviderInspection*>(vp);
|
||||
QString info = that->inspectDistance(point);
|
||||
ViewProviderInspection* self = static_cast<ViewProviderInspection*>(vp);
|
||||
QString info = self->inspectDistance(point);
|
||||
Gui::getMainWindow()->setPaneText(1,info);
|
||||
if (addflag)
|
||||
ViewProviderProxyObject::addFlag(view, info, point);
|
||||
|
||||
@@ -694,6 +694,7 @@ void CmdMeshVertexCurvatureInfo::activated(int)
|
||||
Gui::View3DInventorViewer* viewer = view->getViewer();
|
||||
viewer->setEditing(true);
|
||||
viewer->setRedirectToSceneGraph(true);
|
||||
viewer->setSelectionEnabled(false);
|
||||
viewer->setEditingCursor(QCursor(Gui::BitmapFactory().pixmapFromSvg("mesh_pipette",QSize(32,32)),4,29));
|
||||
viewer->addEventCallback(SoEvent::getClassTypeId(),
|
||||
MeshGui::ViewProviderMeshCurvature::curvatureInfoCallback);
|
||||
|
||||
@@ -497,6 +497,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void * ud, SoEventCallback
|
||||
view->setEditing(false);
|
||||
view->getWidget()->setCursor(QCursor(Qt::ArrowCursor));
|
||||
view->setRedirectToSceneGraph(false);
|
||||
view->setSelectionEnabled(true);
|
||||
view->removeEventCallback(SoEvent::getClassTypeId(), curvatureInfoCallback, ud);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user