diff options
Diffstat (limited to 'indra/newview/llpanelgroup.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llpanelgroup.cpp | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 76b85d5bec..f4aab6bd4e 100644..100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -29,6 +29,7 @@ // Library includes #include "llbutton.h" +#include "llfloatersidepanelcontainer.h" #include "lltabcontainer.h" #include "lltextbox.h" #include "lluictrlfactory.h" @@ -48,14 +49,14 @@ #include "llpanelgroupnotices.h" #include "llpanelgroupgeneral.h" +#include "llpanelgrouproles.h" -#include "llsidetray.h" #include "llaccordionctrltab.h" #include "llaccordionctrl.h" #include "lltrans.h" -static LLRegisterPanelClassWrapper<LLPanelGroup> t_panel_group("panel_group_info_sidetray"); +static LLPanelInjector<LLPanelGroup> t_panel_group("panel_group_info_sidetray"); @@ -275,6 +276,7 @@ void LLPanelGroup::onBtnApply(void* user_data) { LLPanelGroup* self = static_cast<LLPanelGroup*>(user_data); self->apply(); + self->refreshData(); } void LLPanelGroup::onBtnGroupCallClicked(void* user_data) @@ -291,7 +293,7 @@ void LLPanelGroup::onBtnGroupChatClicked(void* user_data) void LLPanelGroup::onBtnJoin() { - lldebugs << "joining group: " << mID << llendl; + LL_DEBUGS() << "joining group: " << mID << LL_ENDL; LLGroupActions::join(mID); } @@ -329,8 +331,9 @@ void LLPanelGroup::update(LLGroupChange gc) if(gdatap) { std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; - childSetValue("group_name", group_name); - childSetToolTip("group_name",group_name); + LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name"); + group_name_ctrl->setValue(group_name); + group_name_ctrl->setToolTip(group_name); LLGroupData agent_gdatap; bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlike(); @@ -376,8 +379,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) if(gdatap) { std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; - childSetValue("group_name", group_name); - childSetToolTip("group_name",group_name); + LLUICtrl* group_name_ctrl = getChild<LLUICtrl>("group_name"); + group_name_ctrl->setValue(group_name); + group_name_ctrl->setToolTip(group_name); } LLButton* button_apply = findChild<LLButton>("btn_apply"); @@ -495,6 +499,22 @@ bool LLPanelGroup::apply(LLPanelGroupTab* tab) { //we skip refreshing group after ew manually apply changes since its very annoying //for those who are editing group + + LLPanelGroupRoles * roles_tab = dynamic_cast<LLPanelGroupRoles*>(tab); + if (roles_tab) + { + LLGroupMgr* gmgrp = LLGroupMgr::getInstance(); + LLGroupMgrGroupData* gdatap = gmgrp->getGroupData(roles_tab->getGroupID()); + + // allow refresh only for one specific case: + // there is only one member in group and it is not owner + // it's a wrong situation and need refresh panels from server + if (gdatap && gdatap->isSingleMemberNotOwner()) + { + return true; + } + } + mSkipRefresh = TRUE; return true; } @@ -597,7 +617,7 @@ void LLPanelGroup::showNotice(const std::string& subject, //static void LLPanelGroup::refreshCreatedGroup(const LLUUID& group_id) { - LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray"); + LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray"); if(!panel) return; panel->setGroupID(group_id); @@ -612,7 +632,7 @@ void LLPanelGroup::showNotice(const std::string& subject, const std::string& inventory_name, LLOfferInfo* inventory_offer) { - LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray"); + LLPanelGroup* panel = LLFloaterSidePanelContainer::getPanel<LLPanelGroup>("people", "panel_group_info_sidetray"); if(!panel) return; |