summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-02 17:10:15 -0800
committerRider Linden <rider@lindenlab.com>2019-01-02 17:10:15 -0800
commitd607d81dba25dfe7dd1ecdf123af656ca939924f (patch)
tree94f45fac6cd13c4677e20be0ada48a0e7985740a
parent5fe626afabd2857980e8011ceb6081f9e9f108c7 (diff)
SL-10279: Temp fix for stale estate info when editing parcel environment.
-rw-r--r--indra/llui/llmultislider.cpp15
-rw-r--r--indra/llui/llmultislider.h5
-rw-r--r--indra/llui/llmultisliderctrl.h3
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp5
-rw-r--r--indra/newview/llpanelenvironment.cpp16
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml3
6 files changed, 44 insertions, 3 deletions
diff --git a/indra/llui/llmultislider.cpp b/indra/llui/llmultislider.cpp
index f30ce28b9d..61e8bdd38c 100644
--- a/indra/llui/llmultislider.cpp
+++ b/indra/llui/llmultislider.cpp
@@ -315,6 +315,21 @@ LLRect LLMultiSlider::getSliderThumbRect(const std::string& name) const
return LLRect();
}
+void LLMultiSlider::setSliderThumbImage(const std::string &name)
+{
+ if (!name.empty())
+ {
+ mThumbImagep = LLUI::getUIImage(name);
+ }
+ else
+ clearSliderThumbImage();
+}
+
+void LLMultiSlider::clearSliderThumbImage()
+{
+ mThumbImagep = NULL;
+}
+
void LLMultiSlider::resetCurSlider()
{
mCurSlider = LLStringUtil::null;
diff --git a/indra/llui/llmultislider.h b/indra/llui/llmultislider.h
index b4331e11c0..b0fca2597d 100644
--- a/indra/llui/llmultislider.h
+++ b/indra/llui/llmultislider.h
@@ -82,6 +82,10 @@ public:
F32 getSliderValueFromPos(S32 xpos, S32 ypos) const;
LLRect getSliderThumbRect(const std::string& name) const;
+ void setSliderThumbImage(const std::string &name);
+ void clearSliderThumbImage();
+
+
const std::string& getCurSlider() const { return mCurSlider; }
F32 getCurSliderValue() const { return getSliderValue(mCurSlider); }
void setCurSlider(const std::string& name);
@@ -113,6 +117,7 @@ public:
F32 getOverlapThreshold() { return mOverlapThreshold; }
bool canAddSliders() { return mValue.size() < mMaxNumSliders; }
+
protected:
LLSD mValue;
std::string mCurSlider;
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index 20d204a6dc..e16737b3c7 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -110,6 +110,9 @@ public:
F32 getSliderValueFromPos(S32 x, S32 y) const { return mMultiSlider->getSliderValueFromPos(x, y); }
LLRect getSliderThumbRect(const std::string &name) const { return mMultiSlider->getSliderThumbRect(name); }
+ void setSliderThumbImage(const std::string &name) { mMultiSlider->setSliderThumbImage(name); }
+ void clearSliderThumbImage() { mMultiSlider->clearSliderThumbImage(); }
+
/// for adding and deleting sliders
const std::string& addSlider();
const std::string& addSlider(F32 val);
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index c768823dc0..41582ffcc3 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -965,6 +965,11 @@ void LLFloaterEditExtDayCycle::selectTrack(U32 track_index, bool force )
bool show_water = (mCurrentTrack == LLSettingsDay::TRACK_WATER);
mSkyTabLayoutContainer->setVisible(!show_water);
mWaterTabLayoutContainer->setVisible(show_water);
+
+ std::string iconname = (show_water) ? "Inv_SettingsWater" : "Inv_SettingsSky";
+
+ mFramesSlider->setSliderThumbImage(iconname);
+
updateSlider();
updateLabels();
}
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 79e3d61014..b4007cfdf0 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -130,7 +130,7 @@ LLPanelEnvironmentInfo::LLPanelEnvironmentInfo():
mCurEnvVersion(INVALID_PARCEL_ENVIRONMENT_VERSION),
mSettingsFloater(),
mEditFloater(),
- mAllowOverride(false)
+ mAllowOverride(true)
{
}
@@ -283,9 +283,21 @@ void LLPanelEnvironmentInfo::refresh()
void LLPanelEnvironmentInfo::refreshFromEstate()
{
+ /*TODO: Bug!! estate_info seems stale if regain floater has not been opened.*/
const LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
- mAllowOverride = estate_info.getAllowEnvironmentOverride();
+ if (isRegion())
+ { // this should always work... but estate_info gives back false when it shouldn't for parcels
+ bool oldAO = mAllowOverride;
+ mAllowOverride = estate_info.getAllowEnvironmentOverride();
+ if (oldAO != mAllowOverride)
+ refresh();
+ }
+ else
+ {
+ // Get rid of this when I solve the above.
+ mAllowOverride = true;
+ }
}
std::string LLPanelEnvironmentInfo::getInventoryNameForAssetId(LLUUID asset_id)
diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
index cac6f334c7..a3dbab2509 100644
--- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
+++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml
@@ -241,7 +241,7 @@
<multi_slider
decimal_digits="0"
follows="bottom"
- height="10"
+ height="12"
increment="0.005"
overlap_threshold="0.026"
loop_overlap="true"
@@ -252,6 +252,7 @@
max_val="1"
name="WLDayCycleFrames"
show_text="false"
+ thumb_width="12"
top_pad="15"
width="525" />