diff options
author | Richard Linden <none@none> | 2011-10-15 18:14:23 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-10-15 18:14:23 -0700 |
commit | 62d9db2f21b2a6fb579e8f7631a4e387cc5e5b29 (patch) | |
tree | 54587047f6f27d3a1b58a23a1a532a4436e61f65 /indra/newview/lltooldraganddrop.cpp | |
parent | 94c137d5c970bc01e3a4dbe8de6a7104085e5ba6 (diff) | |
parent | fc2bd1cce2e6c213fa682b9768d435a4e394a95e (diff) |
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 3e5ce427a8..6910b8eced 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -57,6 +57,7 @@ #include "llviewerwindow.h" #include "llvoavatarself.h" #include "llworld.h" +#include "llclipboard.h" // syntactic sugar #define callMemberFunction(object,ptrToMember) ((object).*(ptrToMember)) @@ -802,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) { @@ -844,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) @@ -899,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 ); @@ -2495,6 +2500,10 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( item = (LLViewerInventoryItem*)preview->getDragItem(); } } + else if(mSource == SOURCE_VIEWER) + { + item = (LLViewerInventoryItem*)gClipboard.getSourceObject(); + } if(item) return item; if(cat) return cat; return NULL; |