Commit b1ac2ff5 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed bug in cursor stereo depth computation. closes #1386

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5bdb0f52
......@@ -2130,12 +2130,24 @@ void glViewer::updateCursorPosition (QPointF _scenePos)
ACG::Vec3d tmp;
unsigned int nodeIdx = 0;
unsigned int targetIdx = 0;
// ignore cursor if we are outside of our window
if (!mapRectToScene(boundingRect ()).intersects (properties_.cursorPainter()->cursorBoundingBox().translated(_scenePos)))
properties_.cursorPositionValid( false );
// only do real pick in stereo mode
else if ( properties_.stereo() && OpenFlipperSettings().value("Core/Gui/glViewer/stereoMousePick",true).toBool() &&
pick (ACG::SceneGraph::PICK_ANYTHING, _scenePos.toPoint(), nodeIdx, targetIdx, &tmp))
// the point we get back will contain the view transformation and we have to revert it
// only do real pick in stereo mode
glstate_->push_modelview_matrix ();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment