diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-03-30 14:09:50 +0300 |
|---|---|---|
| committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-03-30 14:09:50 +0300 |
| commit | 198cd4df09d4d6aa9c5bbb6be9c4395d134f9f13 (patch) | |
| tree | d4b87f39ab6353138594ca153ddadd5b217def00 /indra/newview/llinventorypanel.cpp | |
| parent | e161b128c7eac6df63b6d9210f3bca6c3cbc77ea (diff) | |
| parent | c7053a6928fd5eafdc935453742e92951ae4e0c1 (diff) | |
Merge branch 'main' into DRTVWR-567
# Conflicts:
# indra/newview/llinventoryfunctions.cpp
# indra/newview/llpanelmaininventory.h
# indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
# indra/newview/skins/default/xui/en/sidepanel_item_info.xml
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
| -rw-r--r-- | indra/newview/llinventorypanel.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index caaff79c06..392624a7e8 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1657,6 +1657,7 @@ void LLInventoryPanel::purgeSelectedItems() if (inventory_selected.empty()) return; LLSD args; S32 count = inventory_selected.size(); + std::vector<LLUUID> selected_items; for (std::set<LLFolderViewItem*>::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end(); it != end_it; ++it) @@ -1666,27 +1667,23 @@ void LLInventoryPanel::purgeSelectedItems() LLInventoryModel::item_array_t items; gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH); count += items.size() + cats.size(); + selected_items.push_back(item_id); } args["COUNT"] = count; - LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2)); + LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(callbackPurgeSelectedItems, _1, _2, selected_items)); } -void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response) +// static +void LLInventoryPanel::callbackPurgeSelectedItems(const LLSD& notification, const LLSD& response, const std::vector<LLUUID> inventory_selected) { - if (!mFolderRoot.get()) return; - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { - const std::set<LLFolderViewItem*> inventory_selected = mFolderRoot.get()->getSelectionList(); if (inventory_selected.empty()) return; - std::set<LLFolderViewItem*>::const_iterator it = inventory_selected.begin(); - const std::set<LLFolderViewItem*>::const_iterator it_end = inventory_selected.end(); - for (; it != it_end; ++it) + for (auto it : inventory_selected) { - LLUUID item_id = static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID(); - remove_inventory_object(item_id, NULL); + remove_inventory_object(it, NULL); } } } |
