diff options
| author | Merov Linden <merov@lindenlab.com> | 2014-12-09 06:59:01 -0800 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2014-12-09 06:59:01 -0800 | 
| commit | 9177aea590695b1a46641d2e5a1fc85b7cbcda2c (patch) | |
| tree | 6824d70087aa113e0149ab107fb9e10682ef46a6 /indra/newview | |
| parent | b6bda882afcf1afcd36b611a0b41209304eb7dab (diff) | |
DD-289 : Fix crash when dropping first item in marketplace listings
Diffstat (limited to 'indra/newview')
| -rwxr-xr-x | indra/newview/llfloatermarketplacelistings.cpp | 12 | ||||
| -rwxr-xr-x | indra/newview/llfloatermarketplacelistings.h | 2 | 
2 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 9acacbe674..00fd87fece 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -265,7 +265,7 @@ LLFloaterMarketplaceListings::LLFloaterMarketplaceListings(const LLSD& key)  , mInventoryText(NULL)  , mInventoryTitle(NULL)  , mPanelListings(NULL) -, mFirstViewListings(true) +, mPanelListingsSet(false)  {  } @@ -401,6 +401,9 @@ void LLFloaterMarketplaceListings::setPanels()  	// Get the content of the marketplace listings folder  	fetchContents(); +     +    // Flag that this is done +    mPanelListingsSet = true;  }  void LLFloaterMarketplaceListings::initializeMarketPlace() @@ -454,11 +457,10 @@ void LLFloaterMarketplaceListings::updateView()      // Update the middle portion : tabs or messages  	if (getFolderCount() > 0)  	{ -        if (mFirstViewListings) +        if (!mPanelListingsSet)          {              // We need to rebuild the tabs cleanly the first time we make them visible              setPanels(); -            mFirstViewListings = false;          }  		mPanelListings->setVisible(TRUE);  		mInventoryPlaceholder->setVisible(FALSE); @@ -538,6 +540,10 @@ BOOL LLFloaterMarketplaceListings::handleDragAndDrop(S32 x, S32 y, MASK mask, BO      {          if (!mPanelListings->getVisible() && mRootFolderId.notNull())          { +            if (!mPanelListingsSet) +            { +                setPanels(); +            }              LLFolderView* root_folder = mPanelListings->getRootFolder();              handled = root_folder->handleDragAndDropToThisFolder(mask, drop, cargo_type, cargo_data, accept, tooltip_msg);          } diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index 9fddbc645e..8a9731dafc 100755 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -132,7 +132,7 @@ private:  	LLUUID			mRootFolderId;  	LLPanelMarketplaceListings * mPanelListings; -    bool            mFirstViewListings; +    bool            mPanelListingsSet;  };  //-----------------------------------------------------------------------------  | 
