diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-04-11 21:20:30 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-04-11 21:20:30 +0300 |
commit | af30c8c95b81e99c76bd5e08dcaab4c31dfdcac1 (patch) | |
tree | 44898e0a15a06085cccde8cfe7f696432a04e0b2 /indra | |
parent | 8171224a6510ac8b984dace5f10a6f92cb1e2942 (diff) |
SL-19533 Don't try to restart fetchexcessively
No real point restarting, but due to significant changes decided to keep this around and raise asserts instead of removing.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatermarketplacelistings.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 7 |
5 files changed, 36 insertions, 13 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index df5347718c..c09e9f523d 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -448,7 +448,7 @@ void LLFloaterMarketplaceListings::fetchContents() { LLMarketplaceData::instance().setDataFetchedSignal(boost::bind(&LLFloaterMarketplaceListings::updateView, this)); LLMarketplaceData::instance().setSLMDataFetched(MarketplaceFetchCodes::MARKET_FETCH_LOADING); - LLInventoryModelBackgroundFetch::instance().start(mRootFolderId); + LLInventoryModelBackgroundFetch::instance().start(mRootFolderId, true); LLMarketplaceData::instance().getSLMListings(); } } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 4c80adbd46..3ffe1b3901 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -738,7 +738,11 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) return; } - LLInventoryModelBackgroundFetch::instance().start(); + if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted()) + { + llassert(false); // this should have been done on startup + LLInventoryModelBackgroundFetch::instance().start(); + } mFilterSubString = search_string; if (mActivePanel->getFilterSubString().empty() && mFilterSubString.empty()) @@ -835,9 +839,9 @@ void LLPanelMainInventory::onFilterSelected() finder->setTitle(getLocalizedRootName()); } } - if (filter.isActive()) + if (filter.isActive() && !LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted()) { - // If our filter is active we may be the first thing requiring a fetch so we better start it here. + llassert(false); // this should have been done on startup LLInventoryModelBackgroundFetch::instance().start(); } setFilterTextFromFilter(); @@ -995,8 +999,12 @@ void LLPanelMainInventory::toggleFindOptions() LLFloater* parent_floater = gFloaterView->getParentFloater(this); if (parent_floater) parent_floater->addDependentFloater(mFinderHandle); - // start background fetch of folders - LLInventoryModelBackgroundFetch::instance().start(); + + if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted()) + { + llassert(false); // this should have been done on startup + LLInventoryModelBackgroundFetch::instance().start(); + } if (mSingleFolderMode) { diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 35582d2967..4a755a6e93 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -699,8 +699,12 @@ void LLPanelOutfitEdit::onFolderViewFilterCommitted(LLUICtrl* ctrl) LLOpenFoldersWithSelection opener; mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(opener); mInventoryItemsPanel->getRootFolder()->scrollToShowSelection(); - - LLInventoryModelBackgroundFetch::instance().start(); + + if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted()) + { + llassert(false); // this should have been done on startup + LLInventoryModelBackgroundFetch::instance().start(); + } } void LLPanelOutfitEdit::onListViewFilterCommitted(LLUICtrl* ctrl) @@ -737,8 +741,12 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(opener); mInventoryItemsPanel->getRootFolder()->scrollToShowSelection(); } - - LLInventoryModelBackgroundFetch::instance().start(); + + if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted()) + { + llassert(false); // this should have been done on startup + LLInventoryModelBackgroundFetch::instance().start(); + } if (mInventoryItemsPanel->getFilterSubString().empty() && mSearchString.empty()) { diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 2274937ea5..d8c34d5c40 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -166,7 +166,11 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) mActivePanel->setFilterSubString(LLStringUtil::null); } - LLInventoryModelBackgroundFetch::instance().start(); + if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted()) + { + llassert(false); // this should have been done on startup + LLInventoryModelBackgroundFetch::instance().start(); + } if (mActivePanel->getFilterSubString().empty() && string.empty()) { diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 0ce82a1297..6f29d45f6b 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1478,8 +1478,11 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask) showPicker(FALSE); //grab textures first... LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE)); - //...then start full inventory fetch. - LLInventoryModelBackgroundFetch::instance().start(); + //...then start full inventory fetch (should have been done on startup, but just in case. + if (!LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted()) + { + LLInventoryModelBackgroundFetch::instance().start(); + } handled = TRUE; } else |