aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltoolfocus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lltoolfocus.cpp')
-rw-r--r--linden/indra/newview/lltoolfocus.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/linden/indra/newview/lltoolfocus.cpp b/linden/indra/newview/lltoolfocus.cpp
index e57f5fb..479d55c 100644
--- a/linden/indra/newview/lltoolfocus.cpp
+++ b/linden/indra/newview/lltoolfocus.cpp
@@ -62,9 +62,6 @@ BOOL gCameraBtnPan = FALSE;
62const S32 SLOP_RANGE = 4; 62const S32 SLOP_RANGE = 4;
63const F32 FOCUS_OFFSET_FACTOR = 1.f; 63const F32 FOCUS_OFFSET_FACTOR = 1.f;
64 64
65extern void handle_first_tool(void*);
66
67
68// 65//
69// Camera - shared functionality 66// Camera - shared functionality
70// 67//
@@ -91,13 +88,19 @@ LLToolCamera::~LLToolCamera()
91// virtual 88// virtual
92void LLToolCamera::handleSelect() 89void LLToolCamera::handleSelect()
93{ 90{
94 gFloaterTools->setStatusText("Click and drag to change view"); 91 if (gFloaterTools)
92 {
93 gFloaterTools->setStatusText("Click and drag to change view");
94 }
95} 95}
96 96
97// virtual 97// virtual
98void LLToolCamera::handleDeselect() 98void LLToolCamera::handleDeselect()
99{ 99{
100 gFloaterTools->setStatusText(""); 100 if (gFloaterTools)
101 {
102 gFloaterTools->setStatusText("");
103 }
101// gAgent.setLookingAtAvatar(FALSE); 104// gAgent.setLookingAtAvatar(FALSE);
102} 105}
103 106
@@ -155,7 +158,8 @@ void LLToolCamera::pickCallback(S32 x, S32 y, MASK mask)
155 // check for hud attachments 158 // check for hud attachments
156 if (hit_obj && hit_obj->isHUDAttachment()) 159 if (hit_obj && hit_obj->isHUDAttachment())
157 { 160 {
158 if (!gSelectMgr->getObjectCount() || gSelectMgr->getSelectType() != SELECT_TYPE_HUD) 161 LLObjectSelectionHandle selection = gSelectMgr->getSelection();
162 if (!selection->getObjectCount() || selection->getSelectType() != SELECT_TYPE_HUD)
159 { 163 {
160 gToolCamera->mValidClickPoint = FALSE; 164 gToolCamera->mValidClickPoint = FALSE;
161 return; 165 return;
@@ -194,7 +198,7 @@ void LLToolCamera::pickCallback(S32 x, S32 y, MASK mask)
194 } 198 }
195 //RN: check to see if this is mouse-driving as opposed to ALT-zoom or Focus tool 199 //RN: check to see if this is mouse-driving as opposed to ALT-zoom or Focus tool
196 else if (mask & MASK_ALT || 200 else if (mask & MASK_ALT ||
197 (gToolMgr->getCurrentTool(mask)->getName() == "Camera")) 201 (gToolMgr->getCurrentTool()->getName() == "Camera"))
198 { 202 {
199 LLViewerObject* hit_obj = gViewerWindow->lastObjectHit(); 203 LLViewerObject* hit_obj = gViewerWindow->lastObjectHit();
200 if (hit_obj) 204 if (hit_obj)