diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-07-01 17:33:57 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-07-01 17:33:57 +0300 |
commit | 3a552f5b8bdd425cad666d828d35199cb9b8a85d (patch) | |
tree | 05fcf9dd33ca701427756fd5b85fb64c39b0af84 | |
parent | 62e7b3d3c71cbd777633525595b87991d797ef65 (diff) |
STORM-1464 WIP Removed references to a nonexistent Apply button from the Region/Estate floater.
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index b13233d684..0b66b05350 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -544,8 +544,13 @@ void LLPanelRegionInfo::onChangeText(LLLineEditor* caller, void* user_data) // virtual BOOL LLPanelRegionInfo::postBuild() { - getChild<LLUICtrl>("apply_btn")->setCommitCallback(boost::bind(&LLPanelRegionInfo::onBtnSet, this)); - getChildView("apply_btn")->setEnabled(FALSE); + // If the panel has an Apply button, set a callback for it. + LLUICtrl* apply_btn = findChild<LLUICtrl>("apply_btn"); + if (apply_btn) + { + apply_btn->setCommitCallback(boost::bind(&LLPanelRegionInfo::onBtnSet, this)); + } + refresh(); return TRUE; } @@ -597,12 +602,14 @@ void LLPanelRegionInfo::sendEstateOwnerMessage( void LLPanelRegionInfo::enableButton(const std::string& btn_name, BOOL enable) { - getChildView(btn_name)->setEnabled(enable); + LLView* button = findChildView(btn_name); + if (button) button->setEnabled(enable); } void LLPanelRegionInfo::disableButton(const std::string& btn_name) { - getChildView(btn_name)->setEnabled(FALSE); + LLView* button = findChildView(btn_name); + if (button) button->setEnabled(FALSE); } void LLPanelRegionInfo::initCtrl(const std::string& name) @@ -2115,7 +2122,6 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region) BOOL manager = (region && region->isEstateManager()); setCtrlsEnabled(god || owner || manager); - getChildView("apply_btn")->setEnabled(FALSE); getChildView("add_allowed_avatar_btn")->setEnabled(god || owner || manager); getChildView("remove_allowed_avatar_btn")->setEnabled(god || owner || manager); getChildView("add_allowed_group_btn")->setEnabled(god || owner || manager); |