From 95d0da56fda169a7cce34e07f8ae76f86dce42c0 Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <none@none>
Date: Wed, 7 Jun 2017 18:56:24 +0300
Subject: [PATCH] MAINT-7447 restore filter functionality in Abilities tab

---
 indra/newview/llpanelgroup.h        |  2 ++
 indra/newview/llpanelgrouproles.cpp | 15 +++++++++++++++
 indra/newview/llpanelgrouproles.h   |  1 +
 3 files changed, 18 insertions(+)

diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 0e6f5b8924..05be4b5aee 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -164,6 +164,8 @@ public:
 
 	virtual void setupCtrls	(LLPanel* parent) {};
 
+	virtual void onFilterChanged() { }
+
 protected:
 	LLUUID	mGroupID;
 	BOOL mAllowEdit;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 473451bdb6..78270c20bb 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -494,6 +494,7 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter)
 	mSearchFilter = filter;
 	LLStringUtil::toLower(mSearchFilter);
 	update(GC_ALL);
+	onFilterChanged();
 }
 
 void LLPanelGroupSubTab::activate()
@@ -2826,6 +2827,20 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)
 	}
 }
 
+void LLPanelGroupActionsSubTab::onFilterChanged()
+{
+	mActionDescription->clear();
+	mActionList->deselectAllItems();
+	mActionList->deleteAllItems();
+	buildActionsList(mActionList,
+		GP_ALL_POWERS,
+		GP_ALL_POWERS,
+		NULL,
+		FALSE,
+		TRUE,
+		FALSE);
+}
+
 void LLPanelGroupActionsSubTab::handleActionSelect()
 {
 	mActionMembers->deleteAllItems();
diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h
index 9a696124a8..1d1d69e0ae 100644
--- a/indra/newview/llpanelgrouproles.h
+++ b/indra/newview/llpanelgrouproles.h
@@ -311,6 +311,7 @@ public:
 	virtual bool needsApply(std::string& mesg);
 	virtual bool apply(std::string& mesg);
 	virtual void update(LLGroupChange gc);
+	virtual void onFilterChanged();
 
 	void handleActionSelect();
 
-- 
GitLab