diff options
| author | Rider Linden <rider@lindenlab.com> | 2018-01-23 17:34:25 -0800 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2018-01-23 17:34:25 -0800 |
| commit | 536aeb54a6130f3d1e20405c8f6cbd29201de26d (patch) | |
| tree | 8cc33f38b3ce3e2c2ad881e7929997d6a0ec515c /indra/newview/llpanelenvironment.cpp | |
| parent | 5e544ee35d70fa9e27774ba30ccae06aa6d4d5f9 (diff) | |
MAINT-8052: One more step towards parcel environments.
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
| -rw-r--r-- | indra/newview/llpanelenvironment.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index b606e1de08..c9e29e3e79 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -37,6 +37,10 @@ #include "llslurl.h" #include "lllayoutstack.h" +#include "llfloater.h" +#include "llfloaterreg.h" +#include "llfloatereditextdaycycle.h" + static LLPanelInjector<LLPanelEnvironmentInfo> register_environment_panel("environment_panel"); LLPanelEnvironmentInfo::LLPanelEnvironmentInfo(): @@ -329,7 +333,11 @@ void LLPanelEnvironmentInfo::setDirty(bool dirty) void LLPanelEnvironmentInfo::onSwitchDefaultSelection() { bool use_defaults = mRegionSettingsRadioGroup->getSelectedIndex() == 0; - getChild<LLView>("user_environment_settings")->setEnabled(!use_defaults); + + getChild<LLView>("edit_btn")->setEnabled(!use_defaults); + + mDayLengthSlider->setEnabled(!use_defaults); + mDayOffsetSlider->setEnabled(!use_defaults); setDirty(true); } @@ -352,8 +360,25 @@ void LLPanelEnvironmentInfo::onBtnCancel() void LLPanelEnvironmentInfo::onBtnEdit() { + LLFloaterEditExtDayCycle *dayeditor = (LLFloaterEditExtDayCycle *)LLFloaterReg::getInstance("env_edit_extdaycycle"); + + if (dayeditor) + { + dayeditor->setEditCommitSignal(boost::bind(&LLPanelEnvironmentInfo::onEditiCommited, this, _1)); + dayeditor->openFloater(); + } +} + +void LLPanelEnvironmentInfo::onEditiCommited(LLSettingsDay::ptr_t newday) +{ + doEditCommited(newday); } +void LLPanelEnvironmentInfo::doEditCommited(LLSettingsDay::ptr_t &newday) +{ + mEditingDayCycle = newday; + /*TODO pure virtual*/ +} // void LLPanelEnvironmentInfo::onRegionSettingschange() // { |
