From 5e0b45ad6cac39476f78ffa8d486f06eee53797b Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 3 Mar 2011 19:52:21 -0800 Subject: SOCIAL-629 FIX Search Floater accessible from typing a search term in location bar --- indra/newview/llnavigationbar.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e4f83ce6b9..3b160ddc8e 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -636,18 +636,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) -- cgit v1.2.3