SL-11273 FIXED [EEP] The beacon checkboxes in the Day Cycle window can only be changed while a keyframe is selected.
parent
63ecb7325e
commit
9f2fc2b433
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ void LLPanelSettingsWaterMainTab::setEnabled(BOOL enabled)
|
|||
//==========================================================================
|
||||
void LLPanelSettingsWaterMainTab::refresh()
|
||||
{
|
||||
if (!mWaterSettings)
|
||||
if (!mWaterSettings || !getCanChangeSettings())
|
||||
{
|
||||
setAllChildrenEnabled(FALSE);
|
||||
setEnabled(FALSE);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue