summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-08-15 13:35:53 -0700
committerRider Linden <rider@lindenlab.com>2018-08-15 13:35:53 -0700
commiteadf0b910174274e7c83fe37e417f576a7350edb (patch)
tree1560b09670fba4b867026f0ac7d087dacb1946b2 /indra/llinventory
parent30ef616af5cfbb552458e88acd9f803aa076a08b (diff)
MAINT-8990, MAINT-9002: First pass rework on environment panels, region/parcel
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llsettingsbase.h8
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp18
2 files changed, 21 insertions, 5 deletions
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h
index beaeac2d04..3356727ee6 100644
--- a/indra/llinventory/llsettingsbase.h
+++ b/indra/llinventory/llsettingsbase.h
@@ -87,7 +87,7 @@ public:
inline bool hasSetting(const std::string &param) const { return mSettings.has(param); }
inline bool isDirty() const { return mDirty; }
inline bool isVeryDirty() const { return mReplaced; }
- inline void setDirtyFlag(bool dirty) { mDirty = dirty; }
+ inline void setDirtyFlag(bool dirty) { mDirty = dirty; clearAssetId(); }
size_t getHash() const; // Hash will not include Name, ID or a previously stored Hash
@@ -116,10 +116,10 @@ public:
virtual void replaceSettings(LLSD settings)
{
- mSettings = settings;
mBlendedFactor = 0.0;
setDirtyFlag(true);
mReplaced = true;
+ mSettings = settings;
}
virtual LLSD getSettings() const;
@@ -130,8 +130,8 @@ public:
{
mSettings[name] = value;
mDirty = true;
- if (mSettings.has(SETTING_ASSETID))
- mSettings.erase(SETTING_ASSETID);
+ if (name != SETTING_ASSETID)
+ clearAssetId();
}
inline void setValue(const std::string &name, const LLSD &value)
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index ea57c8987f..20efb23607 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -120,7 +120,7 @@ const S32 LLSettingsDay::FRAME_MAX(56);
const F32 LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR(0.02501f);
-const LLUUID LLSettingsDay::DEFAULT_ASSET_ID("283a26a3-b147-47b7-8057-cfff0302ec0e");
+const LLUUID LLSettingsDay::DEFAULT_ASSET_ID("94d296c2-6e05-963c-6b62-671199121dbb");
// Minimum value to prevent multislider in edit floaters from eating up frames that 'encroach' on one another's space
static const F32 DEFAULT_MULTISLIDER_INCREMENT(0.005f);
@@ -150,6 +150,9 @@ LLSD LLSettingsDay::getSettings() const
if (mSettings.has(SETTING_ID))
settings[SETTING_ID] = mSettings[SETTING_ID];
+ if (mSettings.has(SETTING_ASSETID))
+ settings[SETTING_ASSETID] = mSettings[SETTING_ASSETID];
+
settings[SETTING_TYPE] = getSettingsType();
std::map<std::string, LLSettingsBase::ptr_t> in_use;
@@ -194,6 +197,14 @@ bool LLSettingsDay::initialize(bool validate_frames)
LLSD tracks = mSettings[SETTING_TRACKS];
LLSD frames = mSettings[SETTING_FRAMES];
+ // save for later...
+ LLUUID assetid;
+ if (mSettings.has(SETTING_ASSETID))
+ {
+ assetid = mSettings[SETTING_ASSETID].asUUID();
+ LL_WARNS("LAPRAS") << "initializing daycycle with asset id " << assetid << LL_ENDL;
+ }
+
std::map<std::string, LLSettingsBase::ptr_t> used;
for (LLSD::map_const_iterator itFrame = frames.beginMap(); itFrame != frames.endMap(); ++itFrame)
@@ -385,6 +396,11 @@ bool LLSettingsDay::initialize(bool validate_frames)
mSettings.erase(SETTING_TRACKS);
mSettings.erase(SETTING_FRAMES);
+ if (!assetid.isNull())
+ {
+ mSettings[SETTING_ASSETID] = assetid;
+ }
+
mInitialized = true;
return true;
}