diff options
author | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-11 15:07:44 +0200 |
---|---|---|
committer | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-11 15:07:44 +0200 |
commit | 4a902dd76ae1bbf2e080632ebb51896ed6f007b3 (patch) | |
tree | e31b7385c4b65b3fd7a91b63174381e614551cfb /indra/newview/llpanelgroup.cpp | |
parent | 3a7e3c4328684f9f52f14f7d4cb13ecf5d803ff4 (diff) |
fix normal EXT-3987 [BSI] *Save* button in group profile should be greyed out when there are no changes to save
"save" btn will not be visible for groups where you are not a member. fixed enabled/disabled state
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelgroup.cpp')
-rw-r--r-- | indra/newview/llpanelgroup.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 94de17c17d..50f92ef116 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -423,6 +423,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) getChild<LLUICtrl>("group_name")->setVisible(true); getChild<LLUICtrl>("group_name_editor")->setVisible(false); + + if(button_apply) + button_apply->setVisible(is_member); } reposButtons(); @@ -471,12 +474,17 @@ void LLPanelGroup::draw() childEnable("btn_refresh"); } - bool enable = false; - std::string mesg; - for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it) - enable = enable || (*it)->needsApply(mesg); + LLButton* button_apply = findChild<LLButton>("btn_apply"); + + if(button_apply && button_apply->getVisible()) + { + bool enable = false; + std::string mesg; + for(std::vector<LLPanelGroupTab* >::iterator it = mTabs.begin();it!=mTabs.end();++it) + enable = enable || (*it)->needsApply(mesg); - childSetEnabled("btn_apply", enable); + childSetEnabled("btn_apply", enable); + } } void LLPanelGroup::refreshData() |