SL-19544 WIP apply filter when adding an item to the Gallery

meow-7.2.2
Maxim Nikolenko 2023-04-07 18:02:22 +03:00
parent d5a949d97a
commit 7df076b626
3 changed files with 24 additions and 3 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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 //
////////////////////////////////////////////////////////////////////////////////