Collect all settings in one go

meow-7.2.2
Ansariel 2020-05-10 22:01:37 +02:00
parent 6769482797
commit 4b9aeb99e4
1 changed files with 3 additions and 10 deletions

View File

@ -61,7 +61,7 @@ std::string unescape_name(const std::string& name);
class FSSettingsCollector : public LLInventoryCollectFunctor
{
public:
FSSettingsCollector() { LL_INFOS() << "EEP: Inventory read: " << (gInventory.isInventoryUsable() ? "yes" : "no") << LL_ENDL;}
FSSettingsCollector() {}
virtual ~FSSettingsCollector() {}
bool operator()(LLInventoryCategory* cat, LLInventoryItem* item)
@ -69,7 +69,6 @@ public:
if (item && item->getType() == LLAssetType::AT_SETTINGS &&
mSeen.find(item->getAssetUUID()) == mSeen.end())
{
LL_INFOS() << "EEP: Found " << item->getName() << LL_ENDL;
mSeen.insert(item->getAssetUUID());
return true;
}
@ -334,19 +333,13 @@ void FloaterQuickPrefs::loadWaterPresets(const std::multimap<std::string, LLUUID
void FloaterQuickPrefs::loadPresets()
{
LLInventoryModel::cat_array_t cats;
LLInventoryModel::item_array_t items, libitems;
LLInventoryModel::item_array_t items;
FSSettingsCollector collector;
gInventory.collectDescendentsIf(gInventory.getRootFolderID(),
gInventory.collectDescendentsIf(LLUUID::null,
cats,
items,
LLInventoryModel::EXCLUDE_TRASH,
collector);
gInventory.collectDescendentsIf(gInventory.getLibraryRootFolderID(),
cats,
libitems,
LLInventoryModel::EXCLUDE_TRASH,
collector);
items.insert(items.end(), libitems.begin(), libitems.end());
std::multimap<std::string, LLUUID> sky_map;
std::multimap<std::string, LLUUID> water_map;