summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelgroup.cpp')
-rw-r--r--indra/newview/llpanelgroup.cpp54
1 files changed, 35 insertions, 19 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp
index 086b06c1a3..615a41b143 100644
--- a/indra/newview/llpanelgroup.cpp
+++ b/indra/newview/llpanelgroup.cpp
@@ -180,21 +180,32 @@ void LLPanelGroup::reshape(S32 width, S32 height, BOOL called_from_parent )
{
LLPanel::reshape(width, height, called_from_parent );
- LLButton* button = getChild<LLButton>("btn_apply");
- LLRect btn_rect = button->getRect();
- btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
- button->setRect(btn_rect);
+ LLRect btn_rect;
- button = getChild<LLButton>("btn_create");
- btn_rect = button->getRect();
- btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
- button->setRect(btn_rect);
+ LLButton* button = findChild<LLButton>("btn_apply");
+ if(button)
+ {
+ btn_rect = button->getRect();
+ btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
+ button->setRect(btn_rect);
+ }
+
+ button = findChild<LLButton>("btn_create");
+ if(button)
+ {
+ btn_rect = button->getRect();
+ btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
+ button->setRect(btn_rect);
+ }
- button = getChild<LLButton>("btn_refresh");
- btn_rect = button->getRect();
- btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
- button->setRect(btn_rect);
+ button = findChild<LLButton>("btn_refresh");
+ if(button)
+ {
+ btn_rect = button->getRect();
+ btn_rect.setLeftTopAndSize( btn_rect.mLeft, 28, btn_rect.getWidth(), btn_rect.getHeight());
+ button->setRect(btn_rect);
+ }
}
void LLPanelGroup::onBackBtnClick()
@@ -259,22 +270,27 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id)
for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it)
(*it)->setGroupID(group_id);
- LLButton* button_apply = getChild<LLButton>("btn_apply");
- LLButton* button_refresh = getChild<LLButton>("btn_refresh");
- LLButton* button_create = getChild<LLButton>("btn_create");
+ LLButton* button_apply = findChild<LLButton>("btn_apply");
+ LLButton* button_refresh = findChild<LLButton>("btn_refresh");
+ LLButton* button_create = findChild<LLButton>("btn_create");
bool is_null_group_id = group_id == LLUUID::null;
-
- button_apply->setVisible(!is_null_group_id);
- button_refresh->setVisible(!is_null_group_id);
- button_create->setVisible(is_null_group_id);
+ if(button_apply)
+ button_apply->setVisible(!is_null_group_id);
+ if(button_refresh)
+ button_refresh->setVisible(!is_null_group_id);
+ if(button_create)
+ button_create->setVisible(is_null_group_id);
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");
+ if(!tab_general || !tab_roles || !tab_notices || !tab_land)
+ return;
+
if(is_null_group_id)//creating new group
{
if(!tab_general->getDisplayChildren())