summaryrefslogtreecommitdiff
path: root/indra/newview/llnavigationbar.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-04-05 07:23:43 -0400
committerOz Linden <oz@lindenlab.com>2011-04-05 07:23:43 -0400
commitb5c834c6fdcee7d7238bebfc561ecee3ecca3589 (patch)
tree327ccb1a74e828db62e8d19768ff953192d86f72 /indra/newview/llnavigationbar.cpp
parentfa4359e571fb67aca651efc3403274cdf0bb2616 (diff)
parent2787be7d3558c3ca1ed15863e875612b1b27ec78 (diff)
merge changes for STORM-1051
Diffstat (limited to 'indra/newview/llnavigationbar.cpp')
-rw-r--r--indra/newview/llnavigationbar.cpp19
1 files changed, 10 insertions, 9 deletions
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)