[skip ci] tmp. disable selection when switching to curvature or inspection info modus

This commit is contained in:
wmayer
2019-11-09 11:31:51 +01:00
parent c4093373c4
commit e3046be322
4 changed files with 6 additions and 2 deletions

View File

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

View File

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

View File

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

View File

@@ -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);
}
}