diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-07-15 12:14:34 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-07-15 12:14:34 -0600 |
commit | d9512674678bbb80b8d0d9c5105f56dbd1b2252b (patch) | |
tree | c3c8d64c683cd46d9d1e5d953dc6caca22213db4 /indra/newview/llnavigationbar.cpp | |
parent | d31e6735370711088f01cff448aa22f71c4c10c4 (diff) | |
parent | 44c7c6feaa824f4049d326965cb066e76ebefee3 (diff) |
Merge from viewer-development
Diffstat (limited to 'indra/newview/llnavigationbar.cpp')
-rw-r--r-- | indra/newview/llnavigationbar.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e4f83ce6b9..b8832dfd8e 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -57,6 +57,7 @@ #include "llviewercontrol.h" #include "llfloatermediabrowser.h" #include "llweb.h" +#include "llhints.h" #include "llinventorymodel.h" #include "lllandmarkactions.h" @@ -324,6 +325,8 @@ BOOL LLNavigationBar::postBuild() LLTeleportHistory::getInstance()->setHistoryChangedCallback( boost::bind(&LLNavigationBar::onTeleportHistoryChanged, this)); + LLHints::registerHintTarget("nav_bar", LLView::getHandle()); + return TRUE; } @@ -636,18 +639,19 @@ void LLNavigationBar::onRegionNameResponse( U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport) { // Invalid location? - if (!region_handle) + if (region_handle) + { + // Teleport to the location. + LLVector3d region_pos = from_region_handle(region_handle); + LLVector3d global_pos = region_pos + (LLVector3d) local_coords; + + llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl; + gAgent.teleportViaLocation(global_pos); + } + else if (gSavedSettings.getBOOL("SearchFromAddressBar")) { invokeSearch(typed_location); - return; } - - // Teleport to the location. - LLVector3d region_pos = from_region_handle(region_handle); - LLVector3d global_pos = region_pos + (LLVector3d) local_coords; - - llinfos << "Teleporting to: " << LLSLURL(region_name, global_pos).getSLURLString() << llendl; - gAgent.teleportViaLocation(global_pos); } void LLNavigationBar::showTeleportHistoryMenu(LLUICtrl* btn_ctrl) |