summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermarketplacelistings.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-07 21:51:14 +0200
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-03-10 19:32:47 +0200
commita777a0b27ed6adfa99d708e289e704915f2b62b7 (patch)
tree33cd85469a2342bf1887b29242fa4326d02ddc84 /indra/newview/llfloatermarketplacelistings.cpp
parente364b90d61b7711c088d9bca7307e3760f28c59d (diff)
SL-18629 WIP Replacing UDP creation messages with callback based AIS
Diffstat (limited to 'indra/newview/llfloatermarketplacelistings.cpp')
-rw-r--r--indra/newview/llfloatermarketplacelistings.cpp35
1 files changed, 24 insertions, 11 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index 58bd4bc82b..88fff58fc8 100644
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -230,18 +230,31 @@ void LLPanelMarketplaceListings::onTabChange()
void LLPanelMarketplaceListings::onAddButtonClicked()
{
- // Find active panel
- LLInventoryPanel* panel = (LLInventoryPanel*)getChild<LLTabContainer>("marketplace_filter_tabs")->getCurrentPanel();
- if (panel)
- {
- LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
- llassert(marketplacelistings_id.notNull());
- LLFolderType::EType preferred_type = LLFolderType::lookup("category");
- LLUUID category = gInventory.createNewCategory(marketplacelistings_id, preferred_type, LLStringUtil::null);
- gInventory.notifyObservers();
- panel->setSelectionByID(category, TRUE);
- panel->getRootFolder()->setNeedsAutoRename(TRUE);
+ LLUUID marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
+ llassert(marketplacelistings_id.notNull());
+ LLFolderType::EType preferred_type = LLFolderType::lookup("category");
+ LLHandle<LLPanel> handle = getHandle();
+ gInventory.createNewCategory(
+ marketplacelistings_id,
+ preferred_type,
+ LLStringUtil::null,
+ [handle](const LLUUID &new_cat_id)
+ {
+ // Find active panel
+ LLPanel *marketplace_panel = handle.get();
+ if (!marketplace_panel)
+ {
+ return;
+ }
+ LLInventoryPanel* panel = (LLInventoryPanel*)marketplace_panel->getChild<LLTabContainer>("marketplace_filter_tabs")->getCurrentPanel();
+ if (panel)
+ {
+ gInventory.notifyObservers();
+ panel->setSelectionByID(new_cat_id, TRUE);
+ panel->getRootFolder()->setNeedsAutoRename(TRUE);
+ }
}
+ );
}
void LLPanelMarketplaceListings::onAuditButtonClicked()