+ always move viewer to be orthogonal to sketch when in edit mode

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5125 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
wmayer 2011-11-13 17:44:09 +00:00
parent b297f4b9a0
commit 7c70032797

View File

@ -2864,12 +2864,7 @@ void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int Mo
Base::Rotation tmp(plm.getRotation());
SbRotation rot((float)tmp[0],(float)tmp[1],(float)tmp[2],(float)tmp[3]);
SbVec3f axis(0,0,1);
rot.multVec(axis,axis);
SbVec3f normal = viewer->getViewDirection();
if (fabs(axis.dot(normal)) < FLT_EPSILON) {
viewer->setCameraOrientation(rot);
}
viewer->setCameraOrientation(rot);
viewer->setEditing(TRUE);
SoNode* root = viewer->getSceneGraph();