From 5459e26392e3b3b80c0bf8bbc930d0a93ee8e214 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 3 Jun 2010 12:47:18 +0300 Subject: EXT-7503 WIP Made first inventory fetch for Add to Outfit panel on the first openning, updated reliability of LLInventoryFetchItemsObserver * Moved initialization (with start fetch) of the LLFilteredWearableListManager into LLPanelOutfitEdit::onOpen * LLFilteredWearableListManager::changed now ignores non-related inventory changes (CALLING_CARD, GESTURE, SORT) Tried to fix an issue with empty Gesture list on startup with clean inventory cache. Reason: logic is based on count of "inventory changed" events. In case of there was too many requests requested items can be removed from queue by mistake. * Increased a number of the "change()" method calls to wait fetched items. Unfortunately this only works if My Inventory category does not have too many children. An does not work if it has 2000+ items Logic to remove item from the incompleted list should be based on timer and number of attempts. Also add some debug information about fetching inventory category and its content to log. Reviewed by Brad Payne at https://codereview.productengine.com/secondlife/r/456/ --HG-- branch : product-engine --- indra/newview/llpaneloutfitedit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 85b4259a29..0ca5938c97 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -311,7 +311,6 @@ BOOL LLPanelOutfitEdit::postBuild() mWearableItemsPanel = getChild("filtered_wearables_panel"); mWearableItemsList = getChild("filtered_wearables_list"); - mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector); mSaveComboBtn.reset(new LLSaveOutfitComboBtn(this)); return TRUE; @@ -322,6 +321,9 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key) { if (!mInitialized) { + // *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden. + // So, we can defer initializing a bit. + mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector); displayCurrentOutfit(); mInitialized = true; } -- cgit v1.3 From 07ca580cfab9b587175743130c0abbeb3bf10637 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 3 Jun 2010 13:59:28 +0300 Subject: EXT-7503 WIP Made first inventory fetch for Add to Outfit panel on the first openning, updated reliability of LLInventoryFetchItemsObserver This patch follows (fce2d4f9dc1a). And contains missed by merging changes and fixes Win line endings. Reviewed by Brad Payne at https://codereview.productengine.com/secondlife/r/456/ --HG-- branch : product-engine --- indra/newview/llfilteredwearablelist.cpp | 14 +++++++------- indra/newview/llpaneloutfitedit.cpp | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'indra/newview/llpaneloutfitedit.cpp') diff --git a/indra/newview/llfilteredwearablelist.cpp b/indra/newview/llfilteredwearablelist.cpp index 0c13bbcab7..306fa5ad6d 100644 --- a/indra/newview/llfilteredwearablelist.cpp +++ b/indra/newview/llfilteredwearablelist.cpp @@ -54,13 +54,13 @@ LLFilteredWearableListManager::~LLFilteredWearableListManager() void LLFilteredWearableListManager::changed(U32 mask) { - if (LLInventoryObserver::CALLING_CARD == mask - || LLInventoryObserver::GESTURE == mask - || LLInventoryObserver::SORT == mask - ) - { - // skip non-related changes - return; + if (LLInventoryObserver::CALLING_CARD == mask + || LLInventoryObserver::GESTURE == mask + || LLInventoryObserver::SORT == mask + ) + { + // skip non-related changes + return; } if(!gInventory.isInventoryUsable()) diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index dee9572357..4982e98f8e 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -385,9 +385,10 @@ void LLPanelOutfitEdit::onOpen(const LLSD& key) { if (!mInitialized) { - // *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden. + // *TODO: this method is called even panel is not visible to user because its parent layout panel is hidden. // So, we can defer initializing a bit. mWearableListManager = new LLFilteredWearableListManager(mWearableItemsList, mWearableListMaskCollector); + mWearableListManager->populateList(); displayCurrentOutfit(); mInitialized = true; } -- cgit v1.3