From 05a49dd4252930fbfbb61a7e88ef5ef253cceca6 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 23 Feb 2012 17:12:44 -0800 Subject: PATH-292: Fixing the post-modify update handler to update the linkset list rather than overwrite it. --- indra/newview/llfloaterpathfindinglinksets.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpathfindinglinksets.cpp') diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 73ab01a89f..2b3007b435 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -320,7 +320,7 @@ void LLFloaterPathfindingLinksets::requestSetLinksets(LLPathfindingLinksetListPt llassert(!isMessagingInProgress()); if (!isMessagingInProgress()) { - switch (LLPathfindingManager::getInstance()->requestSetLinksets(pLinksetList, pLinksetUse, pA, pB, pC, pD, boost::bind(&LLFloaterPathfindingLinksets::handleNewLinksets, this, _1, _2))) + switch (LLPathfindingManager::getInstance()->requestSetLinksets(pLinksetList, pLinksetUse, pA, pB, pC, pD, boost::bind(&LLFloaterPathfindingLinksets::handleUpdateLinksets, this, _1, _2))) { case LLPathfindingManager::kLinksetsRequestStarted : setMessagingState(kMessagingSetRequestSent); @@ -359,6 +359,26 @@ void LLFloaterPathfindingLinksets::handleNewLinksets(LLPathfindingManager::ELink } } +void LLFloaterPathfindingLinksets::handleUpdateLinksets(LLPathfindingManager::ELinksetsRequestStatus pLinksetsRequestStatus, LLPathfindingLinksetListPtr pLinksetsListPtr) +{ + mLinksetsListPtr->update(*pLinksetsListPtr); + updateScrollList(); + + switch (pLinksetsRequestStatus) + { + case LLPathfindingManager::kLinksetsRequestCompleted : + setMessagingState(kMessagingComplete); + break; + case LLPathfindingManager::kLinksetsRequestError : + setMessagingState(kMessagingSetError); + break; + default : + setMessagingState(kMessagingSetError); + llassert(0); + break; + } +} + void LLFloaterPathfindingLinksets::onApplyAllFilters() { applyFilters(); -- cgit v1.2.3