diff options
Diffstat (limited to 'indra/newview/llfloaterpathfindingobjects.cpp')
-rw-r--r-- | indra/newview/llfloaterpathfindingobjects.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp index 8aaeb299f1..7ac0d05bac 100644 --- a/indra/newview/llfloaterpathfindingobjects.cpp +++ b/indra/newview/llfloaterpathfindingobjects.cpp @@ -35,6 +35,8 @@ #include <boost/signals2.hpp> #include "llagent.h" +#include "llavatarname.h" +#include "llavatarnamecache.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llenvmanager.h" @@ -162,6 +164,7 @@ LLFloaterPathfindingObjects::LLFloaterPathfindingObjects(const LLSD &pSeed) mReturnButton(NULL), mDeleteButton(NULL), mTeleportButton(NULL), + mLoadingAvatarNames(), mDefaultBeaconColor(), mDefaultBeaconTextColor(), mErrorTextColor(), @@ -346,13 +349,23 @@ void LLFloaterPathfindingObjects::rebuildObjectsScrollList() updateControls(); } -LLSD LLFloaterPathfindingObjects::convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) const +LLSD LLFloaterPathfindingObjects::convertObjectsIntoScrollListData(const LLPathfindingObjectListPtr pObjectListPtr) { llassert(0); LLSD nullObjs = LLSD::emptyArray(); return nullObjs; } +void LLFloaterPathfindingObjects::rebuildScrollListAfterAvatarNameLoads(const LLUUID &pAvatarId) +{ + std::set<LLUUID>::const_iterator iter = mLoadingAvatarNames.find(pAvatarId); + if (iter == mLoadingAvatarNames.end()) + { + mLoadingAvatarNames.insert(pAvatarId); + LLAvatarNameCache::get(pAvatarId, boost::bind(&LLFloaterPathfindingObjects::handleAvatarNameLoads, this, _1, _2)); + } +} + void LLFloaterPathfindingObjects::updateControls() { updateMessagingStatus(); @@ -542,6 +555,16 @@ void LLFloaterPathfindingObjects::onGodLevelChange(U8 pGodLevel) requestGetObjects(); } +void LLFloaterPathfindingObjects::handleAvatarNameLoads(const LLUUID &pAvatarId, const LLAvatarName &pAvatarName) +{ + llassert(mLoadingAvatarNames.find(pAvatarId) != mLoadingAvatarNames.end()); + mLoadingAvatarNames.erase(pAvatarId); + if (mLoadingAvatarNames.empty()) + { + rebuildObjectsScrollList(); + } +} + void LLFloaterPathfindingObjects::updateMessagingStatus() { std::string statusText(""); |