FIRE-15226: Select and scroll to newly created mute by name

Fri, 19 Dec 2014 10:55:28 +0100

author
Ansariel
date
Fri, 19 Dec 2014 10:55:28 +0100
changeset 43092
139328538bb2
parent 43091
7d24a5f56ddd
child 43093
bd4bab7d0868

FIRE-15226: Select and scroll to newly created mute by name

indra/newview/fspanelblocklist.cpp file | annotate | diff | revisions
indra/newview/fspanelblocklist.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/fspanelblocklist.cpp	Thu Dec 18 19:25:41 2014 +0100
     1.2 +++ b/indra/newview/fspanelblocklist.cpp	Fri Dec 19 10:55:28 2014 +0100
     1.3 @@ -307,7 +307,7 @@
     1.4  
     1.5  void FSPanelBlockList::blockObjectByName()
     1.6  {
     1.7 -	LLFloaterGetBlockedObjectName* picker = LLFloaterGetBlockedObjectName::show(&FSPanelBlockList::callbackBlockByName);
     1.8 +	LLFloaterGetBlockedObjectName* picker = LLFloaterGetBlockedObjectName::show(boost::bind(&FSPanelBlockList::callbackBlockByName, this, _1));
     1.9  	LLFloater* parent = dynamic_cast<LLFloater*>(getParent());
    1.10  	if (parent)
    1.11  	{
    1.12 @@ -338,7 +338,6 @@
    1.13  	showPanelAndSelect(mute.mID);
    1.14  }
    1.15  
    1.16 -//static
    1.17  void FSPanelBlockList::callbackBlockByName(const std::string& text)
    1.18  {
    1.19  	if (text.empty()) return;
    1.20 @@ -349,6 +348,11 @@
    1.21  	{
    1.22  		LLNotificationsUtil::add("MuteByNameFailed");
    1.23  	}
    1.24 +	else
    1.25 +	{
    1.26 +		mBlockedList->selectItemByLabel(text);
    1.27 +		mBlockedList->scrollToShowSelected();
    1.28 +	}
    1.29  }
    1.30  
    1.31  void FSPanelBlockList::onFilterEdit(std::string search_string)
     2.1 --- a/indra/newview/fspanelblocklist.h	Thu Dec 18 19:25:41 2014 +0100
     2.2 +++ b/indra/newview/fspanelblocklist.h	Fri Dec 19 10:55:28 2014 +0100
     2.3 @@ -90,7 +90,7 @@
     2.4  	bool isActionEnabled(const LLSD& userdata);
     2.5  
     2.6  	void callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
     2.7 -	static void callbackBlockByName(const std::string& text);
     2.8 +	void callbackBlockByName(const std::string& text);
     2.9  
    2.10  private:
    2.11  	FSBlockListCtrl* mBlockedList;

mercurial