summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
authorAnsariel Hiller <none@none>2011-06-11 18:10:19 -0400
committerAnsariel Hiller <none@none>2011-06-11 18:10:19 -0400
commit786da1eb383502a268f71938e16b525a72e01abe (patch)
tree077ce7a3c2951545c2feb2395c97fe1b042aeab6 /indra/newview/llfloaterworldmap.cpp
parent12d9d1d3ef76518171ae87aae2467593218f8413 (diff)
VWR-25480 Worldmap: Partial region name search UI bug
Patch converted and tested by Jonathan Yap
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp19
1 files changed, 13 insertions, 6 deletions
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<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);
}