SL-11273 FIXED [EEP] The beacon checkboxes in the Day Cycle window can only be changed while a keyframe is selected.

master
maxim_productengine 2019-05-24 17:54:36 +03:00
parent 63ecb7325e
commit 9f2fc2b433
6 changed files with 23 additions and 16 deletions

View File

@ -1613,8 +1613,8 @@ void LLFloaterEditExtDayCycle::setTabsData(LLTabContainer * tabcontainer, const
LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(tabcontainer->getPanelByIndex(idx));
if (panel)
{
panel->setSettings(settings);
panel->setCanChangeSettings(editable & mCanMod);
panel->setSettings(settings);
}
}
}

View File

@ -214,8 +214,8 @@ void LLFloaterFixedEnvironment::refresh()
LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(mTab->getPanelByIndex(idx));
if (panel)
{
panel->refresh();
panel->setCanChangeSettings(mCanMod);
panel->refresh();
}
}
}
@ -851,9 +851,3 @@ void LLFloaterFixedEnvironmentSky::loadSkySettingFromFile(const std::vector<std:
}
//=========================================================================
void LLSettingsEditPanel::setCanChangeSettings(bool enabled)
{
setEnabled(enabled);
setAllChildrenEnabled(enabled);
}

View File

@ -183,7 +183,8 @@ public:
inline void setIsDirty() { mIsDirty = true; if (!mOnDirtyChanged.empty()) mOnDirtyChanged(this, mIsDirty); }
inline void clearIsDirty() { mIsDirty = false; if (!mOnDirtyChanged.empty()) mOnDirtyChanged(this, mIsDirty); }
virtual void setCanChangeSettings(bool flag);
inline bool getCanChangeSettings() const { return mCanEdit; }
inline void setCanChangeSettings(bool flag) { mCanEdit = flag; }
inline connection_t setOnDirtyFlagChanged(on_dirty_charged_sg::slot_type cb) { return mOnDirtyChanged.connect(cb); }
@ -197,6 +198,7 @@ protected:
private:
bool mIsDirty;
bool mCanEdit;
on_dirty_charged_sg mOnDirtyChanged;
};

View File

@ -71,11 +71,16 @@ namespace
const std::string FIELD_SKY_SUN_ROTATION("sun_rotation");
const std::string FIELD_SKY_SUN_IMAGE("sun_image");
const std::string FIELD_SKY_SUN_SCALE("sun_scale");
const std::string FIELD_SKY_SUN_BEACON("sunbeacon");
const std::string FIELD_SKY_MOON_BEACON("moonbeacon");
const std::string FIELD_SKY_MOON_ROTATION("moon_rotation");
const std::string FIELD_SKY_MOON_IMAGE("moon_image");
const std::string FIELD_SKY_MOON_SCALE("moon_scale");
const std::string FIELD_SKY_MOON_BRIGHTNESS("moon_brightness");
const std::string PANEL_SKY_SUN_LAYOUT("sun_layout");
const std::string PANEL_SKY_MOON_LAYOUT("moon_layout");
const std::string FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL("rayleigh_exponential");
const std::string FIELD_SKY_DENSITY_RAYLEIGH_EXPONENTIAL_SCALE("rayleigh_exponential_scale");
const std::string FIELD_SKY_DENSITY_RAYLEIGH_LINEAR("rayleigh_linear");
@ -168,7 +173,7 @@ void LLPanelSettingsSkyAtmosTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkyAtmosTab::refresh()
{
if (!mSkySettings)
if (!mSkySettings || !getCanChangeSettings())
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);
@ -342,7 +347,7 @@ void LLPanelSettingsSkyCloudTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkyCloudTab::refresh()
{
if (!mSkySettings)
if (!mSkySettings || !getCanChangeSettings())
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);
@ -480,15 +485,19 @@ void LLPanelSettingsSkySunMoonTab::setEnabled(BOOL enabled)
getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setEnabled(enabled);
getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setEnabled(enabled);
getChild<LLUICtrl>(FIELD_SKY_MOON_BRIGHTNESS)->setEnabled(enabled);
getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(TRUE);
getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(TRUE);
}
}
void LLPanelSettingsSkySunMoonTab::refresh()
{
if (!mSkySettings)
if (!mSkySettings || !getCanChangeSettings())
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);
getChildView(PANEL_SKY_SUN_LAYOUT)->setAllChildrenEnabled(FALSE);
getChildView(PANEL_SKY_MOON_LAYOUT)->setAllChildrenEnabled(FALSE);
getChildView(FIELD_SKY_SUN_BEACON)->setEnabled(TRUE);
getChildView(FIELD_SKY_MOON_BEACON)->setEnabled(TRUE);
return;
}
@ -654,7 +663,7 @@ void LLPanelSettingsSkyDensityTab::setEnabled(BOOL enabled)
void LLPanelSettingsSkyDensityTab::refresh()
{
if (!mSkySettings)
if (!mSkySettings || !getCanChangeSettings())
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);

View File

@ -130,7 +130,7 @@ void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled)
//==========================================================================
void LLPanelSettingsWaterMainTab::refresh()
{
if (!mWaterSettings)
if (!mWaterSettings || !getCanChangeSettings())
{
setAllChildrenEnabled(FALSE);
setEnabled(FALSE);

View File

@ -21,6 +21,7 @@
auto_resize="true"
user_resize="false"
visible="true"
name="sun_layout"
height="400">
<text
follows="left|top"
@ -209,6 +210,7 @@
auto_resize="true"
user_resize="false"
visible="true"
name="moon_layout"
height="220">
<text
follows="left|top"