summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationinputctrl.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-17 17:02:48 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-17 17:02:48 +0000
commit36e932b4d8590171d8fb3552db89c915684629c9 (patch)
tree524746d4bea01f5f00f24f1dd08ca3634104f381 /indra/newview/lllocationinputctrl.cpp
parent1c7e298e21fbdfada72418a73841c7664cd8ee8b (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1351 https://svn.aws.productengine.com/secondlife/pe/stable-1@1365 -> viewer-2.0.0-3
EXT 451 EXT-303 EXT-367 EXT-367 EXT-371 EXT-394 EXT-494 EXT-502 EXT-503 EXT-516 EXT-538 EXT-540
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r--indra/newview/lllocationinputctrl.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index a6662ef379..cdfb15fd71 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -49,6 +49,7 @@
#include "lllandmarklist.h"
#include "lllocationhistory.h"
#include "llsidetray.h"
+#include "llslurl.h"
#include "lltrans.h"
#include "llviewerinventory.h"
#include "llviewerparcelmgr.h"
@@ -411,6 +412,14 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data)
{
std::string filter = data.asString();
rebuildLocationHistory(filter);
+
+ //Let's add landmarks to the top of the list if any
+ LLInventoryModel::item_array_t landmark_items = LLLandmarkActions::fetchLandmarksByName(filter, TRUE);
+
+ for(U32 i=0; i < landmark_items.size(); i++)
+ {
+ mList->addSimpleElement(landmark_items[i]->getName(), ADD_TOP);
+ }
mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item.
}
@@ -540,8 +549,10 @@ void LLLocationInputCtrl::updateWidgetlayout()
void LLLocationInputCtrl::changeLocationPresentation()
{
- // change location presentation only if user select anything.
- if(mTextEntry && !mTextEntry->hasSelection() )
+ //change location presentation only if user does not select anything and
+ //human-readable region name is being displayed
+ if(mTextEntry && !mTextEntry->hasSelection() &&
+ !LLSLURL::isSLURL(mTextEntry->getText()))
{
mTextEntry->setText(gAgent.getUnescapedSLURL());
mTextEntry->selectAll();