From dd7f0e2954a80e39eba50b7a06e167a50a248632 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 13 Mar 2015 16:55:19 -0400 Subject: MAINT-4980 WIP - moved canAddWearables() to LLAppearanceMgr --- indra/llui/llfolderview.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'indra/llui/llfolderview.cpp') diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 7f0d486981..0fb163c73a 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1809,14 +1809,6 @@ void LLFolderView::updateMenuOptions(LLMenuGL* menu) (*menu_itor)->setEnabled(TRUE); } - - // FIXME this item-by-item approach does not allow options to be - // enabled/disabled based on the selection as a whole - for - // example, if avatar has room for one more wearable, and the - // selection includes two wearables, add should be disabled. - // canAddWearables() in llwearableitemslist.cpp has a more - // holistic approach to this. - // Successively filter out invalid options U32 multi_select_flag = (mSelectedItems.size() > 1 ? ITEM_IN_MULTI_SELECTION : 0x0); U32 flags = multi_select_flag | FIRST_SELECTED_ITEM; @@ -1829,19 +1821,14 @@ void LLFolderView::updateMenuOptions(LLMenuGL* menu) flags = multi_select_flag; } + // This adds a check for restrictions based on the entire + // selection set - for example, any one wearable may not push you + // over the limit, but all wearables together still might. if (getFolderViewGroupedItemModel()) { getFolderViewGroupedItemModel()->groupFilterContextMenu(mSelectedItems,*menu); } -#if 0 - selected_items_t::iterator item_itor = mSelectedItems.begin(); - if (item_itor != mSelectedItems.end()) - { - LLFolderViewItem* selected_item = (*item_itor); - selected_item->getViewModelItem()->groupFilterContextMenu(mSelectedItems,*menu); - } -#endif - + addNoOptions(menu); } -- cgit v1.2.3