summaryrefslogtreecommitdiff
path: root/indra/newview/llnavigationbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnavigationbar.cpp')
-rw-r--r--indra/newview/llnavigationbar.cpp28
1 files changed, 10 insertions, 18 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index e3c4cd4895..9a66507eae 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -315,26 +315,18 @@ void LLNavigationBar::onLocationSelection()
}
else
{
- region_name = extractLocalCoordsFromRegName(typed_location, &x, &y, &z);
-
- if (region_name != typed_location) {
- local_coords.set(x, y, z);
- }
+ LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(typed_location, FALSE);
+ if ( !landmark_items.empty() )
+ {
+ mUpdateTypedLocationHistory = true;
+ gAgent.teleportViaLandmark(landmark_items[0]->getAssetUUID());
+ return;
+ }
else
{
- LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(typed_location);
- LLViewerInventoryItem* item = NULL;
- if ( !landmark_items.empty() )
- {
- item = landmark_items[0];
- }
-
- if (item)
- {
- mUpdateTypedLocationHistory = true;
- gAgent.teleportViaLandmark(item->getAssetUUID());
- return;
- }
+ region_name = extractLocalCoordsFromRegName(typed_location, &x, &y, &z);
+ if (region_name != typed_location)
+ local_coords.set(x, y, z);
}
// Treat it as region name.
// region_name = typed_location;