From 786da1eb383502a268f71938e16b525a72e01abe Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Sat, 11 Jun 2011 18:10:19 -0400 Subject: VWR-25480 Worldmap: Partial region name search UI bug Patch converted and tested by Jonathan Yap --- indra/newview/llfloaterworldmap.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index f8a4ce7ad0..b3910982d1 100755 --- 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("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); } -- cgit v1.2.3