diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-07-11 11:24:05 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-07-11 11:24:05 -0400 |
commit | 48222564def4534b157f91e36a10c4df79010bfc (patch) | |
tree | 65cc1c5ad92a7805b11366e17bb7bb0d11d915e0 /indra/newview/llfloaterworldmap.cpp | |
parent | 55f11fdfd17bdd3d9d0944940c62507741ac6a7b (diff) | |
parent | 97ba99b3c04904633ec3e52f69602a11343e8b4c (diff) |
merge
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index f8a4ce7ad0..eb3c7ee469 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -1070,7 +1070,7 @@ void LLFloaterWorldMap::onComboTextEntry() // Reset the tracking whenever we start typing into any of the search fields, // so that hitting <enter> does an auto-complete versus teleporting us to the // previously selected landmark/friend. - LLTracker::clearFocus(); + LLTracker::stopTracking(NULL); } void LLFloaterWorldMap::onSearchTextEntry( ) @@ -1527,17 +1527,24 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) mCompletingRegionName = ""; } - // if match found, highlight it and go - if (!match.isUndefined()) + if (num_results > 0) { - list->selectByValue(match); + // if match found, highlight it and go + if (!match.isUndefined()) + { + list->selectByValue(match); + } + // else select first found item + else + { + list->selectFirstItem(); + } getChild<LLUICtrl>("search_results")->setFocus(TRUE); onCommitSearchResult(); } - - // if we found nothing, say "none" - if (num_results == 0) + else { + // if we found nothing, say "none" list->setCommentText(LLTrans::getString("worldmap_results_none_found")); list->operateOnAll(LLCtrlListInterface::OP_DESELECT); } |