From 8465910c79b8e746e04fd581cca2d60399e569b9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:07 -0500 Subject: Second Life viewer sources 1.18.3.2-RC --- linden/indra/newview/llmaniptranslate.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'linden/indra/newview/llmaniptranslate.cpp') diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp index a7312fc..e405dc4 100644 --- a/linden/indra/newview/llmaniptranslate.cpp +++ b/linden/indra/newview/llmaniptranslate.cpp @@ -349,7 +349,7 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) if (!selected_object) { // somehow we lost the object! - llwarns << "Translate manip lost the object" << llendl; + llwarns << "Translate manip lost the object, no selected object" << llendl; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -367,9 +367,12 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE) { LLCoordGL mouse_pos; - gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos); - - if (gSavedSettings.getBOOL("SnapToMouseCursor")) + if (!gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos)) + { + // mouse_pos may be nonsense + llwarns << "Failed to project object center to screen" << llendl; + } + else if (gSavedSettings.getBOOL("SnapToMouseCursor")) { LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY); x = mouse_pos.mX; @@ -480,7 +483,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (!selectNode) { // somehow we lost the object! - llwarns << "Translate manip lost the object" << llendl; + llwarns << "Translate manip lost the object, no selectNode" << llendl; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } @@ -489,7 +492,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) if (!object) { // somehow we lost the object! - llwarns << "Translate manip lost the object" << llendl; + llwarns << "Translate manip lost the object, no object in selectNode" << llendl; gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); return TRUE; } -- cgit v1.1