summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-07-23 17:42:06 +0300
committerMike Antipov <mantipov@productengine.com>2010-07-23 17:42:06 +0300
commit85b677823f1515f242e403a6c160af4a9f3ee595 (patch)
tree5d4c99f8d4b3c096c87a97edf5e027ea734a99b7
parent4d2daeed21dfba9d6a40e88ecd92aaaa6df92ae1 (diff)
EXT-8299 FIXED Added rearranging of the group accordion to fit all space if only General tab is visible.
Also fixed name of accordion in code to be consistent with xml. Replaced findChild with getChild (when getting accordion and its tabs) to avoid extra checks against NULL of returned pointers and have warnings in log is xml is not consistent with code. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/798/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llpanelgroup.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index d997b83cbb..2112c8c026 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -413,19 +413,14 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
getChild<LLUICtrl>("prepend_founded_by")->setVisible(!is_null_group_id);
- LLAccordionCtrl* tab_ctrl = findChild<LLAccordionCtrl>("group_accordion");
- if(tab_ctrl)
- tab_ctrl->reset();
+ LLAccordionCtrl* tab_ctrl = getChild<LLAccordionCtrl>("groups_accordion");
+ tab_ctrl->reset();
- LLAccordionCtrlTab* tab_general = findChild<LLAccordionCtrlTab>("group_general_tab");
- LLAccordionCtrlTab* tab_roles = findChild<LLAccordionCtrlTab>("group_roles_tab");
- LLAccordionCtrlTab* tab_notices = findChild<LLAccordionCtrlTab>("group_notices_tab");
- LLAccordionCtrlTab* tab_land = findChild<LLAccordionCtrlTab>("group_land_tab");
+ LLAccordionCtrlTab* tab_general = getChild<LLAccordionCtrlTab>("group_general_tab");
+ LLAccordionCtrlTab* tab_roles = getChild<LLAccordionCtrlTab>("group_roles_tab");
+ LLAccordionCtrlTab* tab_notices = getChild<LLAccordionCtrlTab>("group_notices_tab");
+ LLAccordionCtrlTab* tab_land = getChild<LLAccordionCtrlTab>("group_land_tab");
-
- if(!tab_general || !tab_roles || !tab_notices || !tab_land)
- return;
-
if(mButtonJoin)
mButtonJoin->setVisible(false);
@@ -486,6 +481,8 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
button_chat->setVisible(is_member);
}
+ tab_ctrl->arrange();
+
reposButtons();
update(GC_ALL);//show/hide "join" button if data is already ready
}