summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatereditextdaycycle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatereditextdaycycle.cpp')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index fa16648140..3531e9c4e8 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1260,11 +1260,25 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons
return;
}
- LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1);
+ if (mInventoryItem && !isDirty())
+ {
+ LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), -1, -1);
+ }
+ else
+ {
+ LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1);
+ }
}
else if (where == ACTION_APPLY_REGION)
{
- LLEnvironment::instance().updateRegion(day, -1, -1);
+ if (mInventoryItem && !isDirty())
+ {
+ LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), -1, -1);
+ }
+ else
+ {
+ LLEnvironment::instance().updateRegion(day, -1, -1);
+ }
}
else
{