diff options
author | Merov Linden <merov@lindenlab.com> | 2014-12-04 22:45:04 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-12-04 22:45:04 -0800 |
commit | 4fd175bc314eda71f78670fbb21357ad5ccc33ae (patch) | |
tree | 51383d874ff326e3dec4bd0cec8bf3e9e4941f8f | |
parent | d1d58fbf2526fc5205cb4b3f9930c6d26c645c3f (diff) |
DD-289 : WIP : Prevent building tabs twice
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.cpp | 23 | ||||
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.h | 3 |
2 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index e5e8a34810..54afa53cd3 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -346,7 +346,7 @@ void LLFloaterMarketplaceListings::fetchContents() } } -void LLFloaterMarketplaceListings::setup() +void LLFloaterMarketplaceListings::setRootFolder() { if (LLMarketplaceData::instance().getSLMStatus() != MarketplaceStatusCodes::MARKET_PLACE_MERCHANT) { @@ -362,7 +362,7 @@ void LLFloaterMarketplaceListings::setup() LL_ERRS("SLM") << "Inventory problem: failure to create the marketplace listings folder for a merchant!" << LL_ENDL; return; } - + // No longer need to observe new category creation if (mCategoryAddedObserver && gInventory.containsObserver(mCategoryAddedObserver)) { @@ -377,18 +377,27 @@ void LLFloaterMarketplaceListings::setup() LL_WARNS("SLM") << "Inventory warning: Marketplace listings folder already set" << LL_ENDL; return; } + mRootFolderId = marketplacelistings_id; +} + +void LLFloaterMarketplaceListings::setPanels() +{ + if (mRootFolderId.isNull()) + { + return; + } // Consolidate Marketplace listings // We shouldn't have to do that but with a client/server system relying on a "well known folder" convention, // things get messy and conventions get broken down eventually - gInventory.consolidateForType(marketplacelistings_id, LLFolderType::FT_MARKETPLACE_LISTINGS); + gInventory.consolidateForType(mRootFolderId, LLFolderType::FT_MARKETPLACE_LISTINGS); // Now that we do have a non NULL root, we can build the inventory panels mPanelListings->buildAllPanels(); // Create observer for marketplace listings modifications - if (!mCategoriesObserver && mRootFolderId.notNull()) + if (!mCategoriesObserver) { mCategoriesObserver = new LLInventoryCategoriesObserver(); llassert(mCategoriesObserver); @@ -433,7 +442,7 @@ void LLFloaterMarketplaceListings::updateView() // Get or create the root folder if we are a merchant and it hasn't been done already if (mRootFolderId.isNull() && (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT)) { - setup(); + setRootFolder(); } // Update the bottom initializing status and progress dial @@ -454,9 +463,7 @@ void LLFloaterMarketplaceListings::updateView() if (mFirstViewListings) { // We need to rebuild the tabs cleanly the first time we make them visible - // setup() does it if the root is nixed first - mRootFolderId.setNull(); - setup(); + setPanels(); mFirstViewListings = false; } mPanelListings->setVisible(TRUE); diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index 2521135c0c..9fddbc645e 100755 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -103,7 +103,8 @@ public: void onMouseLeave(S32 x, S32 y, MASK mask); protected: - void setup(); + void setRootFolder(); + void setPanels(); void fetchContents(); void setStatusString(const std::string& statusString); |