MAINT-6655 Group inspector doesn't support default icon.
parent
57060fa0eb
commit
0f06168991
|
|
@ -74,9 +74,16 @@ LLGroupIconCtrl::~LLGroupIconCtrl()
|
|||
LLGroupMgr::getInstance()->removeObserver(this);
|
||||
}
|
||||
|
||||
void LLGroupIconCtrl::setIconId(const LLSD& value)
|
||||
void LLGroupIconCtrl::setIconId(const LLUUID& icon_id)
|
||||
{
|
||||
LLIconCtrl::setValue(value);
|
||||
if (icon_id.notNull())
|
||||
{
|
||||
LLIconCtrl::setValue(icon_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
}
|
||||
}
|
||||
|
||||
void LLGroupIconCtrl::setValue(const LLSD& value)
|
||||
|
|
@ -122,14 +129,7 @@ bool LLGroupIconCtrl::updateFromCache()
|
|||
LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mGroupId);
|
||||
if (!group_data) return false;
|
||||
|
||||
if (group_data->mInsigniaID.notNull())
|
||||
{
|
||||
LLIconCtrl::setValue(group_data->mInsigniaID);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLIconCtrl::setValue(mDefaultIconName, LLViewerFetchedTexture::BOOST_UI);
|
||||
}
|
||||
setIconId(group_data->mInsigniaID);
|
||||
|
||||
if (mDrawTooltip && !group_data->mName.empty())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,13 @@ public:
|
|||
*/
|
||||
virtual void setValue(const LLSD& value);
|
||||
|
||||
void setIconId(const LLSD& value);
|
||||
/**
|
||||
* Sets icon_id as icon value directly. Avoids LLGroupMgr cache checks for group id
|
||||
* Uses default icon in case id is null.
|
||||
*
|
||||
* @params icon_id - it is processed as icon id, default image will be used in case id is null.
|
||||
*/
|
||||
void setIconId(const LLUUID& icon_id);
|
||||
|
||||
// LLGroupMgrObserver observer trigger
|
||||
virtual void changed(LLGroupChange gc);
|
||||
|
|
|
|||
|
|
@ -233,7 +233,8 @@ void LLInspectGroup::processGroupData()
|
|||
|
||||
getChild<LLUICtrl>("group_details")->setValue( LLSD(data->mCharter) );
|
||||
|
||||
getChild<LLUICtrl>("group_icon")->setValue( LLSD(data->mInsigniaID) );
|
||||
// LLGroupIconCtrl
|
||||
getChild<LLUICtrl>("group_icon")->setValue(LLSD(mGroupID));
|
||||
|
||||
std::string cost;
|
||||
bool is_member = LLGroupActions::isInGroup(mGroupID);
|
||||
|
|
|
|||
|
|
@ -1393,7 +1393,7 @@ void LLTextureCtrl::setOnTextureSelectedCallback(texture_selected_callback cb)
|
|||
|
||||
void LLTextureCtrl::setImageAssetName(const std::string& name)
|
||||
{
|
||||
LLPointer<LLUIImage> imagep = LLUI::getUIImage(name, LLGLTexture::BOOST_PREVIEW);
|
||||
LLPointer<LLUIImage> imagep = LLUI::getUIImage(name);
|
||||
if(imagep)
|
||||
{
|
||||
LLViewerFetchedTexture* pTexture = dynamic_cast<LLViewerFetchedTexture*>(imagep->getImage().get());
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Fear the moose! Fear it! And the mongoose too!
|
|||
width="220">
|
||||
L$123 to join
|
||||
</text>
|
||||
<icon
|
||||
<group_icon
|
||||
follows="all"
|
||||
height="38"
|
||||
right="-10"
|
||||
|
|
|
|||
Loading…
Reference in New Issue