From 85b677823f1515f242e403a6c160af4a9f3ee595 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 23 Jul 2010 17:42:06 +0300 Subject: 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 --- indra/newview/llpanelgroup.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelgroup.cpp') 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("prepend_founded_by")->setVisible(!is_null_group_id); - LLAccordionCtrl* tab_ctrl = findChild("group_accordion"); - if(tab_ctrl) - tab_ctrl->reset(); + LLAccordionCtrl* tab_ctrl = getChild("groups_accordion"); + tab_ctrl->reset(); - LLAccordionCtrlTab* tab_general = findChild("group_general_tab"); - LLAccordionCtrlTab* tab_roles = findChild("group_roles_tab"); - LLAccordionCtrlTab* tab_notices = findChild("group_notices_tab"); - LLAccordionCtrlTab* tab_land = findChild("group_land_tab"); + LLAccordionCtrlTab* tab_general = getChild("group_general_tab"); + LLAccordionCtrlTab* tab_roles = getChild("group_roles_tab"); + LLAccordionCtrlTab* tab_notices = getChild("group_notices_tab"); + LLAccordionCtrlTab* tab_land = getChild("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 } -- cgit v1.2.3 From 90353be438268c71300a5dfaac0a5fb79c71551c Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 29 Jul 2010 13:37:29 +0300 Subject: EXT-8179 FIXED (Group profile: 'Save' button remains disabled if state of check-boxes was changed during refreshing of 'General' accordion) Disable accordion while refreshing group properties so the user could not change properties during refresh Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/815/ --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llpanelgroup.cpp') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 2fc74e138b..c383d04940 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -545,6 +545,7 @@ void LLPanelGroup::draw() { mRefreshTimer.stop(); childEnable("btn_refresh"); + childEnable("groups_accordion"); } LLButton* button_apply = findChild("btn_apply"); @@ -573,6 +574,8 @@ void LLPanelGroup::refreshData() // 5 second timeout childDisable("btn_refresh"); + childDisable("groups_accordion"); + mRefreshTimer.start(); mRefreshTimer.setTimerExpirySec(5); } -- cgit v1.2.3