Fix group names on certain group profiles sometimes never Loading in
This commit is contained in:
@@ -86,7 +86,9 @@ void LLNameBox::initFromXML(LLXMLNodePtr node, LLView* parent)
|
||||
node->getAttributeString("initial_value", mInitialValue);
|
||||
setText(mInitialValue);
|
||||
node->getAttribute_bool("rlv_sensitive", mRLVSensitive);
|
||||
node->getAttribute_bool("is_group", mIsGroup);
|
||||
bool is_group;
|
||||
node->getAttribute_bool("is_group", is_group);
|
||||
setIsGroup(is_group);
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
@@ -47,10 +47,21 @@
|
||||
std::set<LLNameUI*> LLNameUI::sInstances;
|
||||
|
||||
LLNameUI::LLNameUI(const std::string& loading, bool rlv_sensitive, const LLUUID& id, bool is_group)
|
||||
: mNameID(id), mRLVSensitive(rlv_sensitive), mIsGroup(is_group), mAllowInteract(false)
|
||||
: mNameID(id), mRLVSensitive(rlv_sensitive), mIsGroup(!is_group), mAllowInteract(false)
|
||||
, mInitialValue(!loading.empty() ? loading : LLTrans::getString("LoadingData"))
|
||||
{
|
||||
if (mIsGroup) sInstances.insert(this);
|
||||
setIsGroup(is_group);
|
||||
}
|
||||
|
||||
void LLNameUI::setIsGroup(bool is_group)
|
||||
{
|
||||
if (mIsGroup != is_group)
|
||||
{
|
||||
if (mIsGroup = is_group)
|
||||
sInstances.insert(this);
|
||||
else
|
||||
sInstances.erase(this);
|
||||
}
|
||||
}
|
||||
|
||||
void LLNameUI::setNameID(const LLUUID& name_id, bool is_group)
|
||||
@@ -58,14 +69,7 @@ void LLNameUI::setNameID(const LLUUID& name_id, bool is_group)
|
||||
mNameID = name_id;
|
||||
mConnection.disconnect();
|
||||
|
||||
if (mIsGroup != is_group)
|
||||
{
|
||||
if (is_group)
|
||||
sInstances.insert(this);
|
||||
else
|
||||
sInstances.erase(this);
|
||||
}
|
||||
mIsGroup = is_group;
|
||||
setIsGroup(is_group);
|
||||
|
||||
if (mAllowInteract = mNameID.notNull())
|
||||
{
|
||||
@@ -139,4 +143,4 @@ void LLNameUI::showProfile()
|
||||
LLGroupActions::show(mNameID);
|
||||
else
|
||||
LLAvatarActions::showProfile(mNameID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ struct LLNameUI : public LFIDBearer
|
||||
uuid_vec_t getSelectedIDs() const override final { return { mNameID }; }
|
||||
S32 getNumSelected() const override final { return 1; }
|
||||
|
||||
void setIsGroup(bool is_group);
|
||||
void setNameID(const LLUUID& name_id, bool is_group);
|
||||
void setNameText(); // Sets the name to whatever the name cache has at the moment
|
||||
void refresh(const LLUUID& id, const std::string& full_name, bool is_group);
|
||||
@@ -84,4 +85,4 @@ protected:
|
||||
bool mIsGroup;
|
||||
bool mAllowInteract;
|
||||
std::string mInitialValue;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user