CHUI-942 FIXED Choose Resident picker problems
parent
5287578d93
commit
705d85fb2f
|
|
@ -1179,10 +1179,10 @@ LLScrollListItem* LLScrollListCtrl::addSeparator(EAddPosition pos)
|
|||
// Selects first enabled item of the given name.
|
||||
// Returns false if item not found.
|
||||
// Calls getItemByLabel in order to combine functionality
|
||||
BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sensitive)
|
||||
BOOL LLScrollListCtrl::selectItemByLabel(const std::string& label, BOOL case_sensitive, S32 column/* = 0*/)
|
||||
{
|
||||
deselectAllItems(TRUE); // ensure that no stale items are selected, even if we don't find a match
|
||||
LLScrollListItem* item = getItemByLabel(label, case_sensitive);
|
||||
LLScrollListItem* item = getItemByLabel(label, case_sensitive, column);
|
||||
|
||||
bool found = NULL != item;
|
||||
if(found)
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ public:
|
|||
// one of which can be selected at a time.
|
||||
virtual LLScrollListItem* addSimpleElement(const std::string& value, EAddPosition pos = ADD_BOTTOM, const LLSD& id = LLSD());
|
||||
|
||||
BOOL selectItemByLabel( const std::string& item, BOOL case_sensitive = TRUE ); // FALSE if item not found
|
||||
BOOL selectItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 ); // FALSE if item not found
|
||||
BOOL selectItemByPrefix(const std::string& target, BOOL case_sensitive = TRUE);
|
||||
BOOL selectItemByPrefix(const LLWString& target, BOOL case_sensitive = TRUE);
|
||||
LLScrollListItem* getItemByLabel( const std::string& item, BOOL case_sensitive = TRUE, S32 column = 0 );
|
||||
|
|
|
|||
|
|
@ -513,6 +513,7 @@ void LLFloaterAvatarPicker::find()
|
|||
url += "/";
|
||||
}
|
||||
url += "?page_size=100&names=";
|
||||
std::replace(text.begin(), text.end(), '.', ' ');
|
||||
url += LLURI::escape(text);
|
||||
llinfos << "avatar picker " << url << llendl;
|
||||
LLHTTPClient::get(url, new LLAvatarPickerResponder(mQueryID, getKey().asString()));
|
||||
|
|
@ -748,7 +749,12 @@ void LLFloaterAvatarPicker::processResponse(const LLUUID& query_id, const LLSD&
|
|||
{
|
||||
getChildView("ok_btn")->setEnabled(true);
|
||||
search_results->setEnabled(true);
|
||||
search_results->selectFirstItem();
|
||||
search_results->sortByColumnIndex(1, TRUE);
|
||||
std::string text = getChild<LLUICtrl>("Edit")->getValue().asString();
|
||||
if (!search_results->selectItemByLabel(text, TRUE, 1))
|
||||
{
|
||||
search_results->selectFirstItem();
|
||||
}
|
||||
onList();
|
||||
search_results->setFocus(TRUE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue