summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-13 19:33:20 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-13 19:33:20 +0300
commit94dd7b2c0c020bad25dab9472d612f673f136422 (patch)
tree2385565990fcc0deade105389a3d06fb5d8b6c94 /indra
parent107a7eb919bb0afadf6ad3f92482cf7e6d67c56e (diff)
SL-19544 WIP search by name should include suffix
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorygallery.cpp12
-rw-r--r--indra/newview/llinventorygallery.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 9344668f52..94996cb941 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -650,7 +650,7 @@ void LLInventoryGallery::applyFilter(LLInventoryGalleryItem* item, const std::st
break;
case LLInventoryFilter::SEARCHTYPE_NAME:
default:
- desc = item->getItemName();
+ desc = item->getItemName() + item->getItemNameSuffix();
break;
}
@@ -1202,6 +1202,7 @@ LLInventoryGalleryItem::LLInventoryGalleryItem(const Params& p)
mSelected(false),
mDefaultImage(true),
mName(""),
+ mSuffix(""),
mUUID(LLUUID()),
mIsFolder(true),
mIsLink(false),
@@ -1397,13 +1398,16 @@ BOOL LLInventoryGalleryItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL dro
void LLInventoryGalleryItem::setWorn(bool value)
{
mWorn = value;
- std::string suffix("");
if(mWorn)
{
- suffix = (mType == LLAssetType::AT_GESTURE) ? getString("active_string") : getString("worn_string");
+ mSuffix = (mType == LLAssetType::AT_GESTURE) ? getString("active_string") : getString("worn_string");
}
- mSuffixText->setValue(suffix);
+ else
+ {
+ mSuffix = "";
+ }
+ mSuffixText->setValue(mSuffix);
mNameText->setFont(getTextFont());
mNameText->setText(mName); // refresh to pick up font changes
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index f0f4c45e04..fd6bd0d502 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -256,6 +256,7 @@ public:
std::string getCreatorName() { return mCreatorName;}
std::string getItemName() {return mName;}
+ std::string getItemNameSuffix() {return mSuffix;}
bool isDefaultImage() {return mDefaultImage;}
bool isHidden() {return mHidden;}
@@ -288,6 +289,7 @@ private:
EInventorySortGroup mSortGroup;
LLAssetType::EType mType;
std::string mName;
+ std::string mSuffix;
LLInventoryGallery* mGallery;
};