PATH-849: Group objects were losing their [group] identifier following the last commit. This should fix that issue.
parent
a7ebb0bd99
commit
6df5229981
|
|
@ -162,6 +162,22 @@ S32 LLFloaterPathfindingCharacters::getNameColumnIndex() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
S32 LLFloaterPathfindingCharacters::getOwnerNameColumnIndex() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
std::string LLFloaterPathfindingCharacters::getOwnerName(const LLPathfindingObject *pObject) const
|
||||
{
|
||||
return (pObject->hasOwner()
|
||||
? (pObject->hasOwnerName()
|
||||
? (pObject->isGroupOwned()
|
||||
? (pObject->getOwnerName() + " " + getString("character_owner_group"))
|
||||
: pObject->getOwnerName())
|
||||
: getString("character_owner_loading"))
|
||||
: getString("character_owner_unknown"));
|
||||
}
|
||||
|
||||
const LLColor4 &LLFloaterPathfindingCharacters::getBeaconColor() const
|
||||
{
|
||||
return mBeaconColor;
|
||||
|
|
@ -206,13 +222,7 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListItemData(const LLPa
|
|||
columns[1]["value"] = pCharacterPtr->getDescription();
|
||||
|
||||
columns[2]["column"] = "owner";
|
||||
columns[2]["value"] = (pCharacterPtr->hasOwner()
|
||||
? (pCharacterPtr->hasOwnerName()
|
||||
? (pCharacterPtr->isGroupOwned()
|
||||
? (pCharacterPtr->getOwnerName() + " " + getString("character_owner_group"))
|
||||
: pCharacterPtr->getOwnerName())
|
||||
: getString("character_owner_loading"))
|
||||
: getString("character_owner_unknown"));
|
||||
columns[2]["value"] = getOwnerName(pCharacterPtr);
|
||||
|
||||
S32 cpuTime = llround(pCharacterPtr->getCPUTime());
|
||||
std::string cpuTimeString = llformat("%d", cpuTime);
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ protected:
|
|||
virtual void updateControlsOnScrollListChange();
|
||||
|
||||
virtual S32 getNameColumnIndex() const;
|
||||
virtual S32 getOwnerNameColumnIndex() const;
|
||||
virtual std::string getOwnerName(const LLPathfindingObject *pObject) const;
|
||||
virtual const LLColor4 &getBeaconColor() const;
|
||||
|
||||
virtual LLPathfindingObjectListPtr getEmptyObjectList() const;
|
||||
|
|
|
|||
|
|
@ -280,6 +280,22 @@ S32 LLFloaterPathfindingLinksets::getNameColumnIndex() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
S32 LLFloaterPathfindingLinksets::getOwnerNameColumnIndex() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
std::string LLFloaterPathfindingLinksets::getOwnerName(const LLPathfindingObject *pObject) const
|
||||
{
|
||||
return (pObject->hasOwner()
|
||||
? (pObject->hasOwnerName()
|
||||
? (pObject->isGroupOwned()
|
||||
? (pObject->getOwnerName() + " " + getString("linkset_owner_group"))
|
||||
: pObject->getOwnerName())
|
||||
: getString("linkset_owner_loading"))
|
||||
: getString("linkset_owner_unknown"));
|
||||
}
|
||||
|
||||
const LLColor4 &LLFloaterPathfindingLinksets::getBeaconColor() const
|
||||
{
|
||||
return mBeaconColor;
|
||||
|
|
@ -398,13 +414,7 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListItemData(const LLPathfi
|
|||
columns[1]["value"] = pLinksetPtr->getDescription();
|
||||
|
||||
columns[2]["column"] = "owner";
|
||||
columns[2]["value"] = (pLinksetPtr->hasOwner()
|
||||
? (pLinksetPtr->hasOwnerName()
|
||||
? (pLinksetPtr->isGroupOwned()
|
||||
? (pLinksetPtr->getOwnerName() + " " + getString("linkset_owner_group"))
|
||||
: pLinksetPtr->getOwnerName())
|
||||
: getString("linkset_owner_loading"))
|
||||
: getString("linkset_owner_unknown"));
|
||||
columns[2]["value"] = getOwnerName(pLinksetPtr);
|
||||
|
||||
columns[3]["column"] = "land_impact";
|
||||
columns[3]["value"] = llformat("%1d", pLinksetPtr->getLandImpact());
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ protected:
|
|||
virtual void updateControlsOnScrollListChange();
|
||||
|
||||
virtual S32 getNameColumnIndex() const;
|
||||
virtual S32 getOwnerNameColumnIndex() const;
|
||||
virtual std::string getOwnerName(const LLPathfindingObject *pObject) const;
|
||||
virtual const LLColor4 &getBeaconColor() const;
|
||||
|
||||
virtual LLPathfindingObjectListPtr getEmptyObjectList() const;
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ void LLFloaterPathfindingObjects::addObjectToScrollList(const LLPathfindingObjec
|
|||
if (pObjectPtr->hasOwner() && !pObjectPtr->hasOwnerName())
|
||||
{
|
||||
mMissingNameObjectsScrollListItems.insert(std::make_pair<std::string, LLScrollListItem *>(pObjectPtr->getUUID().asString(), scrollListItem));
|
||||
pObjectPtr->registerOwnerNameListener(boost::bind(&LLFloaterPathfindingObjects::handleObjectNameResponse, this, _1, _2));
|
||||
pObjectPtr->registerOwnerNameListener(boost::bind(&LLFloaterPathfindingObjects::handleObjectNameResponse, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -435,6 +435,13 @@ S32 LLFloaterPathfindingObjects::getOwnerNameColumnIndex() const
|
|||
return 2;
|
||||
}
|
||||
|
||||
std::string LLFloaterPathfindingObjects::getOwnerName(const LLPathfindingObject *pObject) const
|
||||
{
|
||||
llassert(0);
|
||||
std::string returnVal;
|
||||
return returnVal;
|
||||
}
|
||||
|
||||
const LLColor4 &LLFloaterPathfindingObjects::getBeaconColor() const
|
||||
{
|
||||
return mDefaultBeaconColor;
|
||||
|
|
@ -685,9 +692,10 @@ void LLFloaterPathfindingObjects::onGodLevelChange(U8 pGodLevel)
|
|||
requestGetObjects();
|
||||
}
|
||||
|
||||
void LLFloaterPathfindingObjects::handleObjectNameResponse(const LLUUID &pObjectUUID, const std::string &pOwnerName)
|
||||
void LLFloaterPathfindingObjects::handleObjectNameResponse(const LLPathfindingObject *pObject)
|
||||
{
|
||||
const std::string uuid = pObjectUUID.asString();
|
||||
llassert(pObject != NULL);
|
||||
const std::string uuid = pObject->getUUID().asString();
|
||||
scroll_list_item_map::iterator scrollListItemIter = mMissingNameObjectsScrollListItems.find(uuid);
|
||||
if (scrollListItemIter != mMissingNameObjectsScrollListItems.end())
|
||||
{
|
||||
|
|
@ -695,7 +703,7 @@ void LLFloaterPathfindingObjects::handleObjectNameResponse(const LLUUID &pObject
|
|||
llassert(scrollListItem != NULL);
|
||||
|
||||
LLScrollListCell *scrollListCell = scrollListItem->getColumn(getOwnerNameColumnIndex());
|
||||
LLSD ownerName = pOwnerName;
|
||||
LLSD ownerName = getOwnerName(pObject);
|
||||
|
||||
scrollListCell->setValue(ownerName);
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ protected:
|
|||
|
||||
virtual S32 getNameColumnIndex() const;
|
||||
virtual S32 getOwnerNameColumnIndex() const;
|
||||
virtual std::string getOwnerName(const LLPathfindingObject *pObject) const;
|
||||
virtual const LLColor4 &getBeaconColor() const;
|
||||
virtual const LLColor4 &getBeaconTextColor() const;
|
||||
virtual S32 getBeaconWidth() const;
|
||||
|
|
@ -127,7 +128,7 @@ private:
|
|||
void onRegionBoundaryCrossed();
|
||||
void onGodLevelChange(U8 pGodLevel);
|
||||
|
||||
void handleObjectNameResponse(const LLUUID &pObjectUUID, const std::string &pOwnerName);
|
||||
void handleObjectNameResponse(const LLPathfindingObject *pObject);
|
||||
|
||||
void updateMessagingStatus();
|
||||
void updateStateOnListControls();
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ LLPathfindingObject::name_connection_t LLPathfindingObject::registerOwnerNameLis
|
|||
name_connection_t connection;
|
||||
if (hasOwnerName())
|
||||
{
|
||||
pOwnerNameCallback(getUUID(), getOwnerName());
|
||||
pOwnerNameCallback(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -187,7 +187,7 @@ void LLPathfindingObject::handleAvatarNameFetch(const LLUUID &pOwnerUUID, const
|
|||
|
||||
disconnectAvatarNameCacheConnection();
|
||||
|
||||
mOwnerNameSignal(getUUID(), getOwnerName());
|
||||
mOwnerNameSignal(this);
|
||||
}
|
||||
|
||||
void LLPathfindingObject::disconnectAvatarNameCacheConnection()
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ public:
|
|||
inline BOOL isGroupOwned() const {return mIsGroupOwned;};
|
||||
inline const LLVector3& getLocation() const {return mLocation;};
|
||||
|
||||
typedef boost::function<void (const LLUUID &, const std::string &)> name_callback_t;
|
||||
typedef boost::signals2::signal<void (const LLUUID &, const std::string &)> name_signal_t;
|
||||
typedef boost::signals2::connection name_connection_t;
|
||||
typedef boost::function<void (const LLPathfindingObject *)> name_callback_t;
|
||||
typedef boost::signals2::signal<void (const LLPathfindingObject *)> name_signal_t;
|
||||
typedef boost::signals2::connection name_connection_t;
|
||||
|
||||
name_connection_t registerOwnerNameListener(name_callback_t pOwnerNameCallback);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue