diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-06-22 11:08:36 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2018-06-22 11:08:36 +0300 |
commit | 21f19cb6f036787d93b186d6fcfd595ae6f03d87 (patch) | |
tree | aa09de906e9c2f9c30670e81498f93620c67d9b8 /indra/newview/llsidepanelinventorysubpanel.cpp | |
parent | b0e5bee0b41e050e14d4e315ffa967ba43f96feb (diff) | |
parent | dc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llsidepanelinventorysubpanel.cpp')
-rw-r--r-- | indra/newview/llsidepanelinventorysubpanel.cpp | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp index 2918bb388a..3b73b6b7dd 100644 --- a/indra/newview/llsidepanelinventorysubpanel.cpp +++ b/indra/newview/llsidepanelinventorysubpanel.cpp @@ -50,8 +50,7 @@ LLSidepanelInventorySubpanel::LLSidepanelInventorySubpanel(const LLPanel::Params : LLPanel(p), mIsDirty(TRUE), mIsEditing(FALSE), - mCancelBtn(NULL), - mSaveBtn(NULL) + mCancelBtn(NULL) { } @@ -63,11 +62,12 @@ LLSidepanelInventorySubpanel::~LLSidepanelInventorySubpanel() // virtual BOOL LLSidepanelInventorySubpanel::postBuild() { - mSaveBtn = getChild<LLButton>("save_btn"); - mSaveBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onSaveButtonClicked, this)); - mCancelBtn = getChild<LLButton>("cancel_btn"); - mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this)); + mCancelBtn = findChild<LLButton>("cancel_btn"); + if (mCancelBtn) + { + mCancelBtn->setClickedCallback(boost::bind(&LLSidepanelInventorySubpanel::onCancelButtonClicked, this)); + } return TRUE; } @@ -118,8 +118,10 @@ void LLSidepanelInventorySubpanel::dirty() void LLSidepanelInventorySubpanel::updateVerbs() { - mSaveBtn->setVisible(mIsEditing); - mCancelBtn->setVisible(mIsEditing); + if (mCancelBtn) + { + mCancelBtn->setVisible(mIsEditing); + } } void LLSidepanelInventorySubpanel::onEditButtonClicked() @@ -129,14 +131,6 @@ void LLSidepanelInventorySubpanel::onEditButtonClicked() updateVerbs(); } -void LLSidepanelInventorySubpanel::onSaveButtonClicked() -{ - save(); - setIsEditing(FALSE); - refresh(); - updateVerbs(); -} - void LLSidepanelInventorySubpanel::onCancelButtonClicked() { setIsEditing(FALSE); |