From fcc810c67d251247c1c4f26dfe1dcde0450d7ad5 Mon Sep 17 00:00:00 2001
From: Todd Stinson <stinson@lindenlab.com>
Date: Thu, 28 Jun 2012 16:09:11 -0700
Subject: [PATCH] Ensuring that the linksets filters are cleared before
 attempting to select an object from right-click in-world menu.

---
 indra/newview/llfloaterpathfindinglinksets.cpp | 10 +++-------
 indra/newview/llfloaterpathfindinglinksets.h   |  1 -
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp
index 15490ff87e7..d6a08eeb23c 100644
--- a/indra/newview/llfloaterpathfindinglinksets.cpp
+++ b/indra/newview/llfloaterpathfindinglinksets.cpp
@@ -68,6 +68,7 @@
 void LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects()
 {
 	LLFloaterPathfindingLinksets *linksetsFloater = LLFloaterReg::getTypedInstance<LLFloaterPathfindingLinksets>("pathfinding_linksets");
+	linksetsFloater->clearFilters();
 	linksetsFloater->showFloaterWithSelectionObjects();
 }
 
@@ -287,12 +288,13 @@ void LLFloaterPathfindingLinksets::requestSetLinksets(LLPathfindingObjectListPtr
 
 void LLFloaterPathfindingLinksets::onApplyAllFilters()
 {
-	applyFilters();
+	rebuildObjectsScrollList();
 }
 
 void LLFloaterPathfindingLinksets::onClearFiltersClicked()
 {
 	clearFilters();
+	rebuildObjectsScrollList();
 }
 
 void LLFloaterPathfindingLinksets::onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl)
@@ -322,17 +324,11 @@ void LLFloaterPathfindingLinksets::onApplyChangesClicked()
 	applyEdit();
 }
 
-void LLFloaterPathfindingLinksets::applyFilters()
-{
-	rebuildObjectsScrollList();
-}
-
 void LLFloaterPathfindingLinksets::clearFilters()
 {
 	mFilterByName->clear();
 	mFilterByDescription->clear();
 	setFilterLinksetUse(LLPathfindingLinkset::kUnknown);
-	rebuildObjectsScrollList();
 }
 
 void LLFloaterPathfindingLinksets::updateEditFieldValues()
diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h
index b3e7acfbfec..a4631ffeb7f 100644
--- a/indra/newview/llfloaterpathfindinglinksets.h
+++ b/indra/newview/llfloaterpathfindinglinksets.h
@@ -75,7 +75,6 @@ class LLFloaterPathfindingLinksets : public LLFloaterPathfindingObjects
 	void onWalkabilityCoefficientEntered(LLUICtrl *pUICtrl);
 	void onApplyChangesClicked();
 
-	void applyFilters();
 	void clearFilters();
 
 	void updateEditFieldValues();
-- 
GitLab