summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-11 15:07:44 +0200
committerYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-11 15:07:44 +0200
commit4a902dd76ae1bbf2e080632ebb51896ed6f007b3 (patch)
treee31b7385c4b65b3fd7a91b63174381e614551cfb
parent3a7e3c4328684f9f52f14f7d4cb13ecf5d803ff4 (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
-rw-r--r--indra/newview/llpanelgroup.cpp18
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp11
2 files changed, 15 insertions, 14 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()
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 31dfdde887..21b253223f 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -580,7 +580,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
}
- mComboActiveTitle->resetDirty();
}
// If this was just a titles update, we are done.
@@ -595,8 +594,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
mCtrlShowInGroupList->set(gdatap->mShowInList);
mCtrlShowInGroupList->setEnabled(mAllowEdit && can_change_ident);
- mCtrlShowInGroupList->resetDirty();
-
}
if (mComboMature)
{
@@ -610,19 +607,16 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
}
mComboMature->setEnabled(mAllowEdit && can_change_ident);
mComboMature->setVisible( !gAgent.isTeen() );
- mComboMature->resetDirty();
}
if (mCtrlOpenEnrollment)
{
mCtrlOpenEnrollment->set(gdatap->mOpenEnrollment);
mCtrlOpenEnrollment->setEnabled(mAllowEdit && can_change_member_opts);
- mCtrlOpenEnrollment->resetDirty();
}
if (mCtrlEnrollmentFee)
{
mCtrlEnrollmentFee->set(gdatap->mMembershipFee > 0);
mCtrlEnrollmentFee->setEnabled(mAllowEdit && can_change_member_opts);
- mCtrlEnrollmentFee->resetDirty();
}
if (mSpinEnrollmentFee)
@@ -632,7 +626,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
mSpinEnrollmentFee->setEnabled( mAllowEdit &&
(fee > 0) &&
can_change_member_opts);
- mSpinEnrollmentFee->resetDirty();
}
if (mCtrlReceiveNotices)
{
@@ -641,7 +634,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
mCtrlReceiveNotices->setEnabled(mAllowEdit);
}
- mCtrlReceiveNotices->resetDirty();
}
@@ -665,7 +657,6 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
if (mEditCharter)
{
mEditCharter->setText(gdatap->mCharter);
- mEditCharter->resetDirty();
}
if (mListVisibleMembers)
@@ -693,6 +684,8 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
mListVisibleMembers->addElement(row);
}
}
+
+ resetDirty();
}
void LLPanelGroupGeneral::updateMembers()