Allow clicking on pictures in profiles and picks to open them

Only works if it's not gonna spawn a texture picture, of course.
This commit is contained in:
Lirusaito
2019-02-01 11:54:55 -05:00
parent 1ec0eed867
commit b47ff37612
3 changed files with 23 additions and 6 deletions

View File

@@ -130,7 +130,10 @@ BOOL LLPanelGroupGeneral::postBuild()
mInsignia->setCommitCallback(boost::bind(&LLPanelGroupGeneral::onCommitAny,this));
mDefaultIconID = mInsignia->getImageAssetID();
void show_picture(const LLUUID& id, const std::string& name);
getChild<LLUICtrl>("bigimg")->setCommitCallback(boost::bind(boost::bind(show_picture, boost::bind(&LLTextureCtrl::getImageAssetID, mInsignia), "Group Insignia")));
auto show_pic = [this] { show_picture(mInsignia->getImageAssetID(), "Group Insignia"); };
auto show_pic_if_not_self = [=] { if (!mInsignia->canChange()) show_pic(); };
mInsignia->setMouseUpCallback(std::bind(show_pic_if_not_self));
getChild<LLUICtrl>("bigimg")->setCommitCallback(std::bind(show_pic));
}
mEditCharter = getChild<LLTextEditor>("charter", recurse);