summaryrefslogtreecommitdiff
path: root/indra/newview/lloutfitslist.cpp
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2010-06-18 12:56:02 +0300
committerAndrew Dyukov <adyukov@productengine.com>2010-06-18 12:56:02 +0300
commit9aa710945685a2cae8cfc622f3dc3d900c1ab4c9 (patch)
tree7a84249d2805fb8b150cb90ba6f0b9f31c767e34 /indra/newview/lloutfitslist.cpp
parent7b64357562ceee47d9910f08f4e4fbc1dc108f91 (diff)
EXT-7847 FIXED Disabled "trash" button if an item is selected inside selected outfit.
- Added bool mItemSelected variable and getter for it to determine if the selection inside outfit exists, and used it when determining whether to enable "Trash" button in My Outfits. Reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/600/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lloutfitslist.cpp')
-rw-r--r--indra/newview/lloutfitslist.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 8dd849f947..c5043e1c3d 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -161,6 +161,7 @@ LLOutfitsList::LLOutfitsList()
, mAccordion(NULL)
, mListCommands(NULL)
, mIsInitialized(false)
+ , mItemSelected(false)
{
mCategoriesObserver = new LLInventoryCategoriesObserver();
@@ -418,6 +419,11 @@ boost::signals2::connection LLOutfitsList::addSelectionChangeCallback(selection_
return mSelectionChangeSignal.connect(cb);
}
+bool LLOutfitsList::hasItemSelected()
+{
+ return mItemSelected;
+}
+
//////////////////////////////////////////////////////////////////////////
// Private methods
//////////////////////////////////////////////////////////////////////////
@@ -503,6 +509,8 @@ void LLOutfitsList::changeOutfitSelection(LLWearableItemsList* list, const LLUUI
mSelectedListsMap.clear();
}
+ mItemSelected = list && (list->getSelectedItem() != NULL);
+
mSelectedListsMap.insert(wearables_lists_map_value_t(category_id, list));
setSelectedOutfitUUID(category_id);
}