diff options
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index a8014b8cde..6910b8eced 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -803,7 +803,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) LLViewerObject* hit_obj = pick_info.getObject(); LLSelectMgr::getInstance()->unhighlightAll(); - + bool highlight_object = false; // Treat attachments as part of the avatar they are attached to. if (hit_obj != NULL) { @@ -845,16 +845,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) { target = DT_OBJECT; hit_face = pick_info.mObjectFace; - // if any item being dragged will be applied to the object under our cursor - // highlight that object - for (S32 i = 0; i < (S32)mCargoIDs.size(); i++) - { - if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL)) - { - LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj); - break; - } - } + highlight_object = true; } } else if (pick_info.mPickType == LLPickInfo::PICK_LAND) @@ -900,6 +891,19 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) } } + if (highlight_object && mLastAccept > ACCEPT_NO_LOCKED) + { + // if any item being dragged will be applied to the object under our cursor + // highlight that object + for (S32 i = 0; i < (S32)mCargoIDs.size(); i++) + { + if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL)) + { + LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj); + break; + } + } + } ECursorType cursor = acceptanceToCursor( mLastAccept ); gViewerWindow->getWindow()->setCursor( cursor ); |