aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llmaniptranslate.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llmaniptranslate.cpp15
1 files changed, 9 insertions, 6 deletions
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 )
349 if (!selected_object) 349 if (!selected_object)
350 { 350 {
351 // somehow we lost the object! 351 // somehow we lost the object!
352 llwarns << "Translate manip lost the object" << llendl; 352 llwarns << "Translate manip lost the object, no selected object" << llendl;
353 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); 353 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
354 return TRUE; 354 return TRUE;
355 } 355 }
@@ -367,9 +367,12 @@ BOOL LLManipTranslate::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
367 if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE) 367 if (mManipPart >= LL_YZ_PLANE && mManipPart <= LL_XY_PLANE)
368 { 368 {
369 LLCoordGL mouse_pos; 369 LLCoordGL mouse_pos;
370 gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos); 370 if (!gCamera->projectPosAgentToScreen(select_center_agent, mouse_pos))
371 371 {
372 if (gSavedSettings.getBOOL("SnapToMouseCursor")) 372 // mouse_pos may be nonsense
373 llwarns << "Failed to project object center to screen" << llendl;
374 }
375 else if (gSavedSettings.getBOOL("SnapToMouseCursor"))
373 { 376 {
374 LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY); 377 LLUI::setCursorPositionScreen(mouse_pos.mX, mouse_pos.mY);
375 x = mouse_pos.mX; 378 x = mouse_pos.mX;
@@ -480,7 +483,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
480 if (!selectNode) 483 if (!selectNode)
481 { 484 {
482 // somehow we lost the object! 485 // somehow we lost the object!
483 llwarns << "Translate manip lost the object" << llendl; 486 llwarns << "Translate manip lost the object, no selectNode" << llendl;
484 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); 487 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
485 return TRUE; 488 return TRUE;
486 } 489 }
@@ -489,7 +492,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
489 if (!object) 492 if (!object)
490 { 493 {
491 // somehow we lost the object! 494 // somehow we lost the object!
492 llwarns << "Translate manip lost the object" << llendl; 495 llwarns << "Translate manip lost the object, no object in selectNode" << llendl;
493 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE); 496 gViewerWindow->setCursor(UI_CURSOR_TOOLTRANSLATE);
494 return TRUE; 497 return TRUE;
495 } 498 }