From ce0a5fe14590b8d675b885fccd5f79d7ea17a302 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Tue, 21 Aug 2007 22:17:53 +0000 Subject: EFFECTIVE MERGE: svn merge -r 66133:68118 svn+ssh://svn/svn/linden/branches/maintenance into release Actual action: branched maintenance-r68118, merged in release, then copied result into release --- indra/newview/llmaniptranslate.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/newview/llmaniptranslate.cpp') diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index bdb6380368..c01ca4d0fa 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -329,7 +329,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; } @@ -347,9 +347,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; @@ -460,7 +463,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; } @@ -469,7 +472,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.2.3