summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolobjpicker.cpp
diff options
context:
space:
mode:
authorKarl Steifvater <qarl@lindenlab.com>2008-07-23 21:20:19 +0000
committerKarl Steifvater <qarl@lindenlab.com>2008-07-23 21:20:19 +0000
commit52562e2e664c70dcd476291820ac02b893e489b8 (patch)
tree5137f49f194a6a28f290385c38f689d77656b2e0 /indra/newview/lltoolobjpicker.cpp
parentbc39ad916e8f23ffae12184eee675aa7c1be2ca9 (diff)
svn merge -r92720:92721 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-merge
QAR-698 / DEV-9985 add touch "position" information to touch-events in LSL
Diffstat (limited to 'indra/newview/lltoolobjpicker.cpp')
-rw-r--r--indra/newview/lltoolobjpicker.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/indra/newview/lltoolobjpicker.cpp b/indra/newview/lltoolobjpicker.cpp
index 67e0db962f..ee9c24f269 100644
--- a/indra/newview/lltoolobjpicker.cpp
+++ b/indra/newview/lltoolobjpicker.cpp
@@ -69,7 +69,7 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
if (! handled)
{
// didn't click in any UI object, so must have clicked in the world
- gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback);
handled = TRUE;
}
else
@@ -90,16 +90,10 @@ BOOL LLToolObjPicker::handleMouseDown(S32 x, S32 y, MASK mask)
return handled;
}
-void LLToolObjPicker::pickCallback(S32 x, S32 y, MASK mask)
+void LLToolObjPicker::pickCallback(const LLPickInfo& pick_info)
{
- // You must hit the body for this tool to think you hit the object.
- LLViewerObject* objectp = NULL;
- objectp = gObjectList.findObject( gLastHitObjectID );
- if (objectp)
- {
- LLToolObjPicker::getInstance()->mHitObjectID = objectp->mID;
- LLToolObjPicker::getInstance()->mPicked = TRUE;
- }
+ LLToolObjPicker::getInstance()->mHitObjectID = pick_info.mObjectID;
+ LLToolObjPicker::getInstance()->mPicked = pick_info.mObjectID.notNull();
}
@@ -181,3 +175,4 @@ void LLToolObjPicker::handleDeselect()
}
+