FIRE-754: Do the right thing on world map search results, by Ansariel Hiller

meow-7.2.2
Arrehn 2011-06-11 13:07:39 -04:00
parent 2dd162a525
commit c7c93df2d1
1 changed files with 13 additions and 6 deletions

View File

@ -1542,17 +1542,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);
}