summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-11-30 17:48:08 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-11-30 17:48:08 +0200
commitd66012f85e885679738cf8c488fd8ff460319c85 (patch)
treebb1941153a12040abb44f66e25a4255e2f7bad54
parent58ffb2e4b11d7aaf1fb66531f4925bd359f551cb (diff)
SL-9716 [EEP] "Use Shared Environment" does not enable when applying an environment to a parcel or region
-rw-r--r--indra/newview/llenvironment.cpp7
-rw-r--r--indra/newview/llenvironment.h2
-rw-r--r--indra/newview/llfloatermyenvironment.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml1
5 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 580d0e785a..3a030bb09d 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1731,6 +1731,13 @@ void LLEnvironment::clearExperienceEnvironment(LLUUID experience_id, F32 transit
updateEnvironment(LLSettingsBase::Seconds(transition_time));
}
+void LLEnvironment::setSharedEnvironment()
+{
+ clearEnvironment(LLEnvironment::ENV_LOCAL);
+ setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+ updateEnvironment();
+}
+
void LLEnvironment::setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time)
{
LLSettingsVOBase::getSettingsAsset(asset_id,
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 55881f1c75..7e35fdcfac 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -144,6 +144,8 @@ public:
void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset);
void setEnvironment(EnvSelection_t env, const LLUUID &assetId);
+ void setSharedEnvironment();
+
void clearEnvironment(EnvSelection_t env);
LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env);
LLSettingsDay::Seconds getEnvironmentDayLength(EnvSelection_t env);
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp
index c34ca9e458..f93d7ce8ed 100644
--- a/indra/newview/llfloatermyenvironment.cpp
+++ b/indra/newview/llfloatermyenvironment.cpp
@@ -325,6 +325,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context)
if (context == PARAMETER_REGION)
{
LLEnvironment::instance().updateRegion(asset_id, name, -1, -1);
+ LLEnvironment::instance().setSharedEnvironment();
}
else if (context == PARAMETER_PARCEL)
{
@@ -335,6 +336,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context)
return;
}
LLEnvironment::instance().updateParcel(parcel->getLocalID(), asset_id, name, -1, -1);
+ LLEnvironment::instance().setSharedEnvironment();
}
else if (context == PARAMETER_LOCAL)
{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 6a5c124108..f2d418fc9d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -6945,6 +6945,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action
LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL;
LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, -1, -1);
+ LLEnvironment::instance().setSharedEnvironment();
}
else
LLItemBridge::performAction(model, action);
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 9b24e2ffcf..33ecb4477a 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -880,7 +880,6 @@
function="Inventory.DoToSelected"
parameter="apply_settings_parcel" />
</menu_item_call>
- </menu_item_call>
<menu_item_separator
layout="topleft"
name="Marketplace Separator" />