summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
authorSquire <squire@lindenlab.com>2011-06-28 11:48:25 -0700
committerSquire <squire@lindenlab.com>2011-06-28 11:48:25 -0700
commit03969822f5cff99c124772466bf4e86da9fa05aa (patch)
tree7caba1865fb37d905e0b33e62baab3c19971eace /indra/newview/llfloaterworldmap.cpp
parentdf91a44d2951fa348796610f0c84be25bd2031e0 (diff)
parent3bc99274f19ce0cbc3e600c0010655e2778ab405 (diff)
Merged in viewer-development changes
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);
}