From 44045a233b969b0a352100d8e46ca1aafc9cf5e1 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Sat, 24 Mar 2012 10:29:23 +0200 Subject: 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) --- indra/newview/llnavigationbar.cpp | 9 +-------- indra/newview/llnavigationbar.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 2a08cb1845..95caa2731a 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -267,7 +267,6 @@ LLNavigationBar::LLNavigationBar() mBtnForward(NULL), mBtnHome(NULL), mCmbLocation(NULL), - mPurgeTPHistoryItems(false), mSaveToLocationHistory(false) { buildFromFile( "panel_navigation_bar.xml"); @@ -338,12 +337,6 @@ void LLNavigationBar::setVisible(BOOL visible) void LLNavigationBar::draw() { - if(mPurgeTPHistoryItems) - { - LLTeleportHistory::getInstance()->purgeItems(); - mPurgeTPHistoryItems = false; - } - if (isBackgroundVisible()) { static LLUICachedControl drop_shadow_floater ("DropShadowFloater", 0); @@ -687,7 +680,7 @@ void LLNavigationBar::clearHistoryCache() LLLocationHistory* lh = LLLocationHistory::getInstance(); lh->removeItems(); lh->save(); - mPurgeTPHistoryItems= true; + LLTeleportHistory::getInstance()->purgeItems(); } int LLNavigationBar::getDefNavBarHeight() diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h index e4ce9e3998..7878bab24e 100644 --- a/indra/newview/llnavigationbar.h +++ b/indra/newview/llnavigationbar.h @@ -145,7 +145,6 @@ private: 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; }; -- cgit v1.2.3