summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniptranslate.cpp
diff options
context:
space:
mode:
authorChristian Goetze <cg@lindenlab.com>2007-08-21 22:17:53 +0000
committerChristian Goetze <cg@lindenlab.com>2007-08-21 22:17:53 +0000
commitce0a5fe14590b8d675b885fccd5f79d7ea17a302 (patch)
tree3388e6f8ff02292ec4521d278c841801462945b8 /indra/newview/llmaniptranslate.cpp
parentb699ae454d8477d19342d320758cd993d1d28cec (diff)
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
Diffstat (limited to 'indra/newview/llmaniptranslate.cpp')
-rw-r--r--indra/newview/llmaniptranslate.cpp15
1 files changed, 9 insertions, 6 deletions
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;
}