diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2011-07-08 16:06:49 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2011-07-08 16:06:49 -0700 |
commit | d7318bf9f07c1b043a9b4f50ce38b78eb3985e36 (patch) | |
tree | 80575768d0636caaa93b63bc5d39cafa6b21cf83 /indra/newview/llfloaterworldmap.cpp | |
parent | 5edd6b606b9bc011c64c890200a9fb54072e9fde (diff) | |
parent | 0553d47045e65a0249ec7ee514078161a4bec97e (diff) |
merge
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index f8a4ce7ad0..b3910982d1 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -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); } |