summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-07 18:02:22 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-07 18:02:22 +0300
commit7df076b62682b7e9749bb402958a3ea6735be283 (patch)
tree17d8db4230eb77e8ba4d55c57bd3b326a83a9efa /indra/newview
parentd5a949d97a67c8b9e551fc4b22d4c901eaf1d91a (diff)
SL-19544 WIP apply filter when adding an item to the Gallery
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorygallery.cpp1
-rw-r--r--indra/newview/llinventorypanel.cpp2
-rw-r--r--indra/newview/llpanelmaininventory.cpp24
3 files changed, 24 insertions, 3 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index e38f2ef849..4e4a476584 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -713,6 +713,7 @@ void LLInventoryGallery::updateAddedItem(LLUUID item_id)
item->setFocusReceivedCallback(boost::bind(&LLInventoryGallery::changeItemSelection, this, item_id));
if (mGalleryCreated)
{
+ applyFilter(item, mFilterSubString);
addToGallery(item);
}
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 0589b5b3f3..cc81b53841 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1801,7 +1801,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
{
LLSidepanelInventory *inventory_panel = inventory_floater->findChild<LLSidepanelInventory>("main_panel");
LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel();
- if(main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode())
+ if(main_panel->isSingleFolderMode() && (main_panel->isGalleryViewMode() || main_panel->isCombinationViewMode()))
{
main_panel->setGallerySelection(obj_id);
return;
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index e5c0e4cf9c..4c80adbd46 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -506,9 +506,9 @@ void LLPanelMainInventory::doCreate(const LLSD& userdata)
menu_create_inventory_item(getPanel(), bridge, userdata);
}
}
- else if(isGalleryViewMode())
+ else
{
- menu_create_inventory_item(NULL, mInventoryGalleryPanel->getRootFolder(), userdata);
+ menu_create_inventory_item(NULL, getCurrentSFVRoot(), userdata);
}
}
else
@@ -625,6 +625,11 @@ void LLPanelMainInventory::setSearchType(LLInventoryFilter::ESearchType type)
{
mInventoryGalleryPanel->setSearchType(type);
}
+ if(mSingleFolderMode && isCombinationViewMode())
+ {
+ mCombinationPanelInventory->setSearchType(type);
+ mCombinationGalleryPanel->setSearchType(type);
+ }
else
{
getActivePanel()->setSearchType(type);
@@ -639,6 +644,10 @@ void LLPanelMainInventory::updateSearchTypeCombo()
{
search_type = mInventoryGalleryPanel->getSearchType();
}
+ else if(mSingleFolderMode && isCombinationViewMode())
+ {
+ search_type = mCombinationGalleryPanel->getSearchType();
+ }
else
{
search_type = getActivePanel()->getSearchType();
@@ -2280,6 +2289,17 @@ void LLPanelMainInventory::setGallerySelection(const LLUUID& item_id)
{
mInventoryGalleryPanel->changeItemSelection(item_id);
}
+ else if(mSingleFolderMode && isCombinationViewMode())
+ {
+ if(mCombinationGalleryPanel->getFilter().checkAgainstFilterThumbnails(item_id))
+ {
+ mCombinationGalleryPanel->changeItemSelection(item_id);
+ }
+ else
+ {
+ mCombinationPanelInventory->setSelection(item_id, false);
+ }
+ }
}
// List Commands //
////////////////////////////////////////////////////////////////////////////////