summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpipette.cpp
diff options
context:
space:
mode:
authorKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
committerKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
commitdf4f20d4f51e41355e876f734527b4245543415c (patch)
tree36aaf66ddb96b27fb9701764153cd7d17add275a /indra/newview/lltoolpipette.cpp
parent0c0391cc7114bd2e9e4462c40e88814326f61bc2 (diff)
merge uv-picking branch.
svn merge -r92602:92632 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-4
Diffstat (limited to 'indra/newview/lltoolpipette.cpp')
-rw-r--r--indra/newview/lltoolpipette.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/lltoolpipette.cpp b/indra/newview/lltoolpipette.cpp
index a565e4361b..9456cd4472 100644
--- a/indra/newview/lltoolpipette.cpp
+++ b/indra/newview/lltoolpipette.cpp
@@ -67,9 +67,8 @@ BOOL LLToolPipette::handleMouseDown(S32 x, S32 y, MASK mask)
{
mSuccess = TRUE;
mTooltipMsg.clear();
- gPickFaces = TRUE;
setMouseCapture(TRUE);
- gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback);
return TRUE;
}
@@ -88,8 +87,7 @@ BOOL LLToolPipette::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->setCursor(mSuccess ? UI_CURSOR_PIPETTE : UI_CURSOR_NO);
if (hasMouseCapture()) // mouse button is down
{
- gPickFaces = TRUE;
- gViewerWindow->hitObjectOrLandGlobalAsync(x, y, mask, pickCallback);
+ gViewerWindow->pickAsync(x, y, mask, pickCallback);
return TRUE;
}
return FALSE;
@@ -107,19 +105,19 @@ BOOL LLToolPipette::handleToolTip(S32 x, S32 y, std::string& msg, LLRect *sticky
return TRUE;
}
-void LLToolPipette::pickCallback(S32 x, S32 y, MASK mask)
+void LLToolPipette::pickCallback(const LLPickInfo& pick_info)
{
- LLViewerObject* hit_obj = gViewerWindow->lastObjectHit();
+ LLViewerObject* hit_obj = pick_info.getObject();
LLSelectMgr::getInstance()->unhighlightAll();
// if we clicked on a face of a valid prim, save off texture entry data
if (hit_obj &&
hit_obj->getPCode() == LL_PCODE_VOLUME &&
- gLastHitObjectFace != -1)
+ pick_info.mObjectFace != -1)
{
//TODO: this should highlight the selected face only
LLSelectMgr::getInstance()->highlightObjectOnly(hit_obj);
- LLToolPipette::getInstance()->mTextureEntry = *hit_obj->getTE(gLastHitObjectFace);
+ LLToolPipette::getInstance()->mTextureEntry = *hit_obj->getTE(pick_info.mObjectFace);
if (LLToolPipette::getInstance()->mSelectCallback)
{
LLToolPipette::getInstance()->mSelectCallback(LLToolPipette::getInstance()->mTextureEntry, LLToolPipette::getInstance()->mUserData);