Commits

Paul ProductEngine  committed 30e9361

MAINT-807 FIXED ([PUBLIC]Button Clear history from Preferences isn't clear last teleport)

- The order of clearing LLTeleportHistory and LLTeleportHistoryStorage does matter:
first LLTeleportHistory must be cleared after LLTeleportHistoryStorage.
Clearing LLTeleportHistory from LLNavigationBar::draw() breaks this order (see callback_clear_browser_cache)

  • Participants
  • Parent commits 01baeb8

Comments (0)

Files changed (2)

File indra/newview/llnavigationbar.cpp

 	mBtnForward(NULL),
 	mBtnHome(NULL),
 	mCmbLocation(NULL),
-	mPurgeTPHistoryItems(false),
 	mSaveToLocationHistory(false)
 {
 	buildFromFile( "panel_navigation_bar.xml");
 
 void LLNavigationBar::draw()
 {
-	if(mPurgeTPHistoryItems)
-	{
-		LLTeleportHistory::getInstance()->purgeItems();
-		mPurgeTPHistoryItems = false;
-	}
-
 	if (isBackgroundVisible())
 	{
 		static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
 	LLLocationHistory* lh = LLLocationHistory::getInstance();
 	lh->removeItems();
 	lh->save();	
-	mPurgeTPHistoryItems= true;
+	LLTeleportHistory::getInstance()->purgeItems();
 }
 
 int LLNavigationBar::getDefNavBarHeight()

File indra/newview/llnavigationbar.h

 	boost::signals2::connection	mTeleportFailedConnection;
 	boost::signals2::connection	mTeleportFinishConnection;
 	boost::signals2::connection	mHistoryMenuConnection;
-	bool						mPurgeTPHistoryItems;
 	// if true, save location to location history when teleport finishes
 	bool						mSaveToLocationHistory;
 };