diff options
| -rw-r--r-- | indra/newview/lllocationhistory.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llnavigationbar.cpp | 3 | 
2 files changed, 3 insertions, 18 deletions
diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index 9ab57a9d76..179eca2532 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -37,29 +37,11 @@  #include <iomanip> // for std::setw()  #include "llui.h" -#include "llagent.h" -#include "llslurl.h" -#include "llviewerregion.h" -#include "llviewerparcelmgr.h" - -void addLocationHistory() -{	 -	LLVector3 position = gAgent.getPositionAgent(); -	std::string region_name = gAgent.getRegion()->getName(); -	std::string location = LLSLURL::buildSLURL(region_name, -			(S32)(position.mV[VX]),  -		    (S32)(position.mV[VY]),  -			(S32)(position.mV[VZ]) ); -	LLLocationHistory* lh = LLLocationHistory::getInstance(); -	lh->addItem(location); -	lh->save(); -}  LLLocationHistory::LLLocationHistory() :  	mFilename("typed_locations.txt"),  	mLoadedCallback(NULL)  { -	LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(addLocationHistory);  }  void LLLocationHistory::addItem(std::string item) diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index df43b069c8..b4a6e63de8 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -415,7 +415,10 @@ void LLNavigationBar::onRegionNameResponse(  	S32 selected_item = mCmbLocation->getCurrentIndex();  	if (selected_item == -1) // user has typed text  	{ +		LLLocationHistory* lh = LLLocationHistory::getInstance();  		mCmbLocation->add(typed_location); +		lh->addItem(typed_location); +		lh->save();  	}  	// Teleport to the location.  | 
