summaryrefslogtreecommitdiff
path: root/indra/newview/llwearableitemslist.cpp
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-06-10 22:49:25 +0300
committerSergei Litovchuk <slitovchuk@productengine.com>2010-06-10 22:49:25 +0300
commitab399e0cd5dfe4045f275ac3e8ee9b02266ac780 (patch)
tree2343afe9bb622cff401e18044f5eb2dfc9564601 /indra/newview/llwearableitemslist.cpp
parent33d91c0a396632d55f0b322f10d1594ee2990e1d (diff)
EXT-7609 FIXED Item name (worn) suffix made searchable.
- Wearable list items filter now searches sub-string in whole item title including (worn) suffix. - Removed (worn) indication from items which don't need it in Edit Outfit. Only worn items can be edited there. - Added null pointer checks for inventory item member of LLPanelInventoryListItemBase class and its descendants. Reviewed by Vadim Savchuk https://codereview.productengine.com/secondlife/r/551/. --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r--indra/newview/llwearableitemslist.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp
index 2eb6bd0df2..f86838194e 100644
--- a/indra/newview/llwearableitemslist.cpp
+++ b/indra/newview/llwearableitemslist.cpp
@@ -126,6 +126,19 @@ BOOL LLPanelWearableOutfitItem::handleDoubleClick(S32 x, S32 y, MASK mask)
return LLUICtrl::handleDoubleClick(x, y, mask);
}
+// virtual
+void LLPanelWearableOutfitItem::updateItem(const std::string& name)
+{
+ std::string search_label = name;
+
+ if (mItem && get_is_item_worn(mItem->getUUID()))
+ {
+ search_label += LLTrans::getString("worn");
+ }
+
+ LLPanelInventoryListItemBase::updateItem(search_label);
+}
+
LLPanelWearableOutfitItem::LLPanelWearableOutfitItem(LLViewerInventoryItem* item)
: LLPanelInventoryListItemBase(item)
{
@@ -292,12 +305,6 @@ LLPanelDummyClothingListItem* LLPanelDummyClothingListItem::create(LLWearableTyp
return list_item;
}
-void LLPanelDummyClothingListItem::updateItem()
-{
- std::string title = wearableTypeToString(mWearableType);
- setTitle(title, LLStringUtil::null);
-}
-
BOOL LLPanelDummyClothingListItem::postBuild()
{
LLIconCtrl* icon = getChild<LLIconCtrl>("item_icon");
@@ -307,7 +314,7 @@ BOOL LLPanelDummyClothingListItem::postBuild()
addWidgetToRightSide("btn_add_panel");
setIconImage(LLInventoryIcon::getIcon(LLAssetType::AT_CLOTHING, LLInventoryType::IT_NONE, mWearableType, FALSE));
- updateItem();
+ updateItem(wearableTypeToString(mWearableType));
// Make it look loke clothing item - reserve space for 'delete' button
setLeftWidgetsWidth(icon->getRect().mLeft);