diff options
Diffstat (limited to 'linden/indra/newview/llpanelgroup.cpp')
-rw-r--r-- | linden/indra/newview/llpanelgroup.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/linden/indra/newview/llpanelgroup.cpp b/linden/indra/newview/llpanelgroup.cpp index 5887cc0..99744c9 100644 --- a/linden/indra/newview/llpanelgroup.cpp +++ b/linden/indra/newview/llpanelgroup.cpp | |||
@@ -1,6 +1,8 @@ | |||
1 | /** | 1 | /** |
2 | * @file llpanelgroup.cpp | 2 | * @file llpanelgroup.cpp |
3 | * | 3 | * |
4 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | ||
5 | * | ||
4 | * Copyright (c) 2006-2007, Linden Research, Inc. | 6 | * Copyright (c) 2006-2007, Linden Research, Inc. |
5 | * | 7 | * |
6 | * Second Life Viewer Source Code | 8 | * Second Life Viewer Source Code |
@@ -23,6 +25,7 @@ | |||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
25 | * COMPLETENESS OR PERFORMANCE. | 27 | * COMPLETENESS OR PERFORMANCE. |
28 | * $/LicenseInfo$ | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #include "llviewerprecompiledheaders.h" | 31 | #include "llviewerprecompiledheaders.h" |
@@ -165,11 +168,11 @@ LLPanelGroup::LLPanelGroup(const std::string& filename, | |||
165 | mFactoryMap["roles_sub_tab"] = LLCallbackMap(LLPanelGroupRolesSubTab::createTab, &mID); | 168 | mFactoryMap["roles_sub_tab"] = LLCallbackMap(LLPanelGroupRolesSubTab::createTab, &mID); |
166 | mFactoryMap["actions_sub_tab"] = LLCallbackMap(LLPanelGroupActionsSubTab::createTab, &mID); | 169 | mFactoryMap["actions_sub_tab"] = LLCallbackMap(LLPanelGroupActionsSubTab::createTab, &mID); |
167 | 170 | ||
171 | gGroupMgr->addObserver(this); | ||
172 | |||
168 | // Pass on construction of this panel to the control factory. | 173 | // Pass on construction of this panel to the control factory. |
169 | gUICtrlFactory->buildPanel(this, filename, &getFactoryMap()); | 174 | gUICtrlFactory->buildPanel(this, filename, &getFactoryMap()); |
170 | mFilename = filename; | 175 | mFilename = filename; |
171 | |||
172 | gGroupMgr->addObserver(this); | ||
173 | } | 176 | } |
174 | 177 | ||
175 | LLPanelGroup::~LLPanelGroup() | 178 | LLPanelGroup::~LLPanelGroup() |
@@ -342,7 +345,7 @@ void LLPanelGroup::tabChanged() | |||
342 | if ( mApplyBtn ) | 345 | if ( mApplyBtn ) |
343 | { | 346 | { |
344 | LLString mesg; | 347 | LLString mesg; |
345 | mApplyBtn->setEnabled(mAllowEdit && mCurrentTab->needsApply(mesg)); | 348 | mApplyBtn->setEnabled(mCurrentTab->needsApply(mesg)); |
346 | } | 349 | } |
347 | } | 350 | } |
348 | 351 | ||
@@ -611,6 +614,12 @@ void LLPanelGroup::draw() | |||
611 | mRefreshTimer.stop(); | 614 | mRefreshTimer.stop(); |
612 | childEnable("btn_refresh"); | 615 | childEnable("btn_refresh"); |
613 | } | 616 | } |
617 | if (mCurrentTab) | ||
618 | { | ||
619 | LLString mesg; | ||
620 | childSetEnabled("btn_apply", mCurrentTab->needsApply(mesg)); | ||
621 | } | ||
622 | |||
614 | } | 623 | } |
615 | 624 | ||
616 | void LLPanelGroup::refreshData() | 625 | void LLPanelGroup::refreshData() |