diff options
author | Graham Linden <none@none> | 2014-09-25 09:20:01 -0700 |
---|---|---|
committer | Graham Linden <none@none> | 2014-09-25 09:20:01 -0700 |
commit | 9f4788d7a8a924de654d55bfb102a81f797a9cf9 (patch) | |
tree | 742fb8127dc84052265647ed110e8a6446253103 /indra/newview/lltooldraganddrop.cpp | |
parent | 6004ad167458914c3b85438b96e81ea8796e368b (diff) | |
parent | 499f5aa9a4b46d61ee94b26d5c86bc032766af70 (diff) |
Merge viewer-release 3.7.17
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rwxr-xr-x | indra/newview/lltooldraganddrop.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index eabf6f0497..575e5c5c52 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -513,6 +513,7 @@ void LLToolDragAndDrop::onMouseCaptureLost() mSource = SOURCE_AGENT; mSourceID.setNull(); mObjectID.setNull(); + mCustomMsg.clear(); } BOOL LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask ) @@ -556,6 +557,12 @@ ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance ) mCursor = UI_CURSOR_NOLOCKED; break; + case ACCEPT_NO_CUSTOM: + mToolTipMsg = mCustomMsg; + mCursor = UI_CURSOR_NO; + break; + + case ACCEPT_NO: mCursor = UI_CURSOR_NO; break; @@ -630,6 +637,7 @@ BOOL LLToolDragAndDrop::handleToolTip(S32 x, S32 y, MASK mask) void LLToolDragAndDrop::handleDeselect() { mToolTipMsg.clear(); + mCustomMsg.clear(); LLToolTipMgr::instance().blockToolTips(); } @@ -2164,6 +2172,26 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( // TODO: investigate wearables may not be loaded at this point EXT-8231 } + U32 max_items = gSavedSettings.getU32("WearFolderLimit"); + if (category->getDescendentCount()>max_items) + { + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false); + gInventory.collectDescendentsIf(category->getUUID(), + cats, + items, + LLInventoryModel::EXCLUDE_TRASH, + not_worn); + if (items.size() > max_items) + { + LLStringUtil::format_map_t args; + args["AMOUNT"] = llformat("%d", max_items); + mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args); + return ACCEPT_NO_CUSTOM; + } + } + if(mSource == SOURCE_AGENT) { const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); |