summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloaterdeleteenvpreset.cpp2
-rw-r--r--indra/newview/llfloaterregioninfo.cpp56
-rw-r--r--indra/newview/llfloaterregioninfo.h7
-rw-r--r--indra/newview/llregioninfomodel.cpp1
-rw-r--r--indra/newview/llviewermessage.cpp3
-rw-r--r--indra/newview/llviewerregion.cpp1
-rw-r--r--indra/newview/skins/default/xui/da/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/de/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml5
-rw-r--r--indra/newview/skins/default/xui/es/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/fr/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/it/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml3
-rw-r--r--indra/newview/skins/default/xui/nl/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/pl/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/pt/strings.xml7
-rw-r--r--indra/newview/skins/default/xui/zh/strings.xml7
17 files changed, 55 insertions, 86 deletions
diff --git a/indra/newview/llfloaterdeleteenvpreset.cpp b/indra/newview/llfloaterdeleteenvpreset.cpp
index 4fefd2242a..d08aa81cfe 100644
--- a/indra/newview/llfloaterdeleteenvpreset.cpp
+++ b/indra/newview/llfloaterdeleteenvpreset.cpp
@@ -258,7 +258,7 @@ void LLFloaterDeleteEnvPreset::populateDayCyclesList()
void LLFloaterDeleteEnvPreset::postPopulate()
{
// Handle empty list and empty selection.
- bool has_selection = mPresetCombo->getItemCount() > 1 && mPresetCombo->getSelectedValue().isDefined();
+ bool has_selection = mPresetCombo->getItemCount() > 0 && mPresetCombo->getSelectedValue().isDefined();
if (!has_selection)
{
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 07c0878877..bedc7ef704 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -317,11 +317,8 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**)
// static
void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
{
- LL_DEBUGS("Windlight") << "Processing region info" << LL_ENDL;
-
LLPanel* panel;
LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance<LLFloaterRegionInfo>("region_info");
- llinfos << "LLFloaterRegionInfo::processRegionInfo" << llendl;
if(!floater)
{
return;
@@ -330,6 +327,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
// We need to re-request environment setting here,
// otherwise after we apply (send) updated region settings we won't get them back,
// so our environment won't be updated.
+ // This is also the way to know about externally changed region environment.
LLEnvManagerNew::instance().requestRegionSettings();
LLTabContainer* tab = floater->getChild<LLTabContainer>("region_panels");
@@ -3249,29 +3247,30 @@ void LLPanelEnvironmentInfo::setDirty(bool dirty)
getChildView("cancel_btn")->setEnabled(dirty);
}
-void LLPanelEnvironmentInfo::sendRegionSunUpdate(F32 sun_angle)
+void LLPanelEnvironmentInfo::sendRegionSunUpdate()
{
LLRegionInfoModel& region_info = LLRegionInfoModel::instance();
- bool region_use_fixed_sky = sun_angle >= 0.f;
- // Set sun hour.
+ // If the region is being switched to fixed sky,
+ // change the region's sun hour according to the (fixed) sun position.
+ // This is needed for llGetSunDirection() LSL function to work properly (STORM-1330).
+ const LLSD& sky_map = mNewRegionSettings.getSkyMap();
+ bool region_use_fixed_sky = sky_map.size() == 1;
if (region_use_fixed_sky)
{
LLWLParamSet param_set;
- LLSD params;
- std::string unused;
- if (!getSelectedSkyParams(params, unused))
- {
- return;
- }
- param_set.setAll(params);
+ llassert(sky_map.isMap());
+ param_set.setAll(sky_map.beginMap()->second);
+ F32 sun_angle = param_set.getSunAngle();
+ LL_DEBUGS("Windlight Sync") << "Old sun hour: " << region_info.mSunHour << LL_ENDL;
// convert value range from 0..2pi to 6..30
region_info.mSunHour = fmodf((sun_angle / F_TWO_PI) * 24.f, 24.f) + 6.f;
}
region_info.setUseFixedSun(region_use_fixed_sky);
region_info.mUseEstateSun = !region_use_fixed_sky;
+ LL_DEBUGS("Windlight Sync") << "Sun hour: " << region_info.mSunHour << LL_ENDL;
region_info.sendRegionTerrain(LLFloaterRegionInfo::getLastInvoice());
}
@@ -3555,7 +3554,6 @@ void LLPanelEnvironmentInfo::onBtnApply()
LLSD day_cycle;
LLSD sky_map;
LLSD water_params;
- F32 sun_angle = -1.f; // invalid value meaning no fixed sky
if (use_defaults)
{
@@ -3588,9 +3586,6 @@ void LLPanelEnvironmentInfo::onBtnApply()
param_set.setAll(params);
refs[LLWLParamKey(preset_name, LLEnvKey::SCOPE_LOCAL)] = param_set; // scope doesn't matter here
sky_map = LLWLParamManager::createSkyMap(refs);
-
- // Remember the sun angle to set fixed region sun hour below.
- sun_angle = param_set.getSunAngle();
}
else // use day cycle
{
@@ -3611,16 +3606,6 @@ void LLPanelEnvironmentInfo::onBtnApply()
LL_DEBUGS("Windlight") << "Fixing negative time" << LL_ENDL;
day_cycle[0][0] = 0.0f;
}
-
- // If the day cycle contains exactly one preset (i.e it's effectively a fixed sky),
- // remember the preset's sun angle to set fixed region sun hour below.
- if (sky_map.size() == 1)
- {
- LLWLParamSet param_set;
- llassert(sky_map.isMap());
- param_set.setAll(sky_map.beginMap()->second);
- sun_angle = param_set.getSunAngle();
- }
}
// Get water params.
@@ -3640,8 +3625,9 @@ void LLPanelEnvironmentInfo::onBtnApply()
return;
}
- // Set the region sun phase/flags according to the chosen new preferences.
- sendRegionSunUpdate(sun_angle);
+ // When the settings get applied, we'll also send the region sun position update.
+ // To determine the sun angle we're going to need the new settings.
+ mNewRegionSettings = new_region_settings;
// Start spinning the progress indicator.
setApplyProgress(true);
@@ -3672,10 +3658,18 @@ void LLPanelEnvironmentInfo::onRegionSettingschange()
void LLPanelEnvironmentInfo::onRegionSettingsApplied(bool ok)
{
- LL_DEBUGS("Windlight") << "Applying region settings finished, stopping indicator" << LL_ENDL;
// If applying new settings has failed, stop the indicator right away.
// Otherwise it will be stopped when we receive the updated settings from server.
- if (!ok)
+ if (ok)
+ {
+ // Set the region sun phase/flags according to the chosen new preferences.
+ //
+ // If we do this earlier we may get jerky transition from fixed sky to a day cycle (STORM-1481).
+ // That is caused by the simulator re-sending the region info, which in turn makes us
+ // re-request and display old region environment settings while the new ones haven't been applied yet.
+ sendRegionSunUpdate();
+ }
+ else
{
setApplyProgress(false);
diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h
index 4809937324..e7917c382c 100644
--- a/indra/newview/llfloaterregioninfo.h
+++ b/indra/newview/llfloaterregioninfo.h
@@ -34,6 +34,8 @@
#include "llhost.h"
#include "llpanel.h"
+#include "llenvmanager.h" // for LLEnvironmentSettings
+
class LLAvatarName;
class LLDispatcher;
class LLLineEditor;
@@ -431,7 +433,7 @@ private:
void setApplyProgress(bool started);
void setDirty(bool dirty);
- void sendRegionSunUpdate(F32 sun_angle);
+ void sendRegionSunUpdate();
void populateWaterPresetsList();
void populateSkyPresetsList();
@@ -454,6 +456,9 @@ private:
void onRegionSettingschange();
void onRegionSettingsApplied(bool ok);
+ /// New environment settings that are being applied to the region.
+ LLEnvironmentSettings mNewRegionSettings;
+
bool mEnableEditing;
LLRadioGroup* mRegionSettingsRadioGroup;
diff --git a/indra/newview/llregioninfomodel.cpp b/indra/newview/llregioninfomodel.cpp
index 6238f183c1..698c4f9bb9 100644
--- a/indra/newview/llregioninfomodel.cpp
+++ b/indra/newview/llregioninfomodel.cpp
@@ -157,6 +157,7 @@ void LLRegionInfoModel::update(LLMessageSystem* msg)
// actually the "last set" sun hour, not the current sun hour. JC
msg->getF32(_PREHASH_RegionInfo, _PREHASH_SunHour, mSunHour);
+ LL_DEBUGS("Windlight Sync") << "Got region sun hour: " << mSunHour << LL_ENDL;
// the only reasonable way to decide if we actually have any data is to
// check to see if any of these fields have nonzero sizes
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 44b3a85f25..e934c38c22 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4346,8 +4346,7 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec);
- LL_DEBUGS("Windlight Sync") << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
- << ", " << phase << LL_ENDL;
+ LL_DEBUGS("Windlight Sync") << "Sun phase: " << phase << " rad = " << fmodf(phase / F_TWO_PI + 0.25, 1.f) * 24.f << " h" << LL_ENDL;
gSky.setSunPhase(phase);
gSky.setSunTargetDirection(sun_direction, sun_ang_velocity);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 8ba231b28c..bb7170e0f7 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -645,6 +645,7 @@ void LLViewerRegion::processRegionInfo(LLMessageSystem* msg, void**)
{
// send it to 'observers'
// *TODO: switch the floaters to using LLRegionInfoModel
+ llinfos << "Processing region info" << llendl;
LLRegionInfoModel::instance().update(msg);
LLFloaterGodTools::processRegionInfo(msg);
LLFloaterRegionInfo::processRegionInfo(msg);
diff --git a/indra/newview/skins/default/xui/da/strings.xml b/indra/newview/skins/default/xui/da/strings.xml
index 68b861fe92..b5d8ac44bc 100644
--- a/indra/newview/skins/default/xui/da/strings.xml
+++ b/indra/newview/skins/default/xui/da/strings.xml
@@ -1209,9 +1209,6 @@ Prøv venligst om lidt igen.
<string name="InvFolder My Inventory">
Min beholdning
</string>
- <string name="InvFolder My Favorites">
- Mine favoritter
- </string>
<string name="InvFolder Library">
Bibliotek
</string>
@@ -1270,10 +1267,10 @@ Prøv venligst om lidt igen.
Bevægelser
</string>
<string name="InvFolder Favorite">
- Favoritter
+ Mine favoritter
</string>
<string name="InvFolder favorite">
- Favoritter
+ Mine favoritter
</string>
<string name="InvFolder Current Outfit">
Nuværende sæt
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index d77b4a1e44..ed38267466 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -1238,9 +1238,6 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
<string name="InvFolder My Inventory">
Mein Inventar
</string>
- <string name="InvFolder My Favorites">
- Meine Favoriten
- </string>
<string name="InvFolder Library">
Bibliothek
</string>
@@ -1299,10 +1296,10 @@ Warten Sie kurz und versuchen Sie dann noch einmal, sich anzumelden.
Gesten
</string>
<string name="InvFolder Favorite">
- Favoriten
+ Meine Favoriten
</string>
<string name="InvFolder favorite">
- Favoriten
+ Meine Favoriten
</string>
<string name="InvFolder Current Outfit">
Aktuelles Outfit
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 2e2ef6ee19..022c97f341 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2069,7 +2069,6 @@ Returns a string with the requested data about the region
<!-- inventory folder -->
<string name="InvFolder My Inventory">My Inventory</string>
- <string name="InvFolder My Favorites">My Favorites</string>
<string name="InvFolder Library">Library</string>
<string name="InvFolder Textures">Textures</string>
<string name="InvFolder Sounds">Sounds</string>
@@ -2089,10 +2088,10 @@ Returns a string with the requested data about the region
<string name="InvFolder Uncompressed Sounds">Uncompressed Sounds</string>
<string name="InvFolder Animations">Animations</string>
<string name="InvFolder Gestures">Gestures</string>
- <string name="InvFolder Favorite">Favorites</string>
+ <string name="InvFolder Favorite">My Favorites</string>
<!-- historically default name of the Favorites folder can start from either "f" or "F" letter.
We should localize both of them with the same value -->
- <string name="InvFolder favorite">Favorites</string>
+ <string name="InvFolder favorite">My Favorites</string>
<string name="InvFolder Current Outfit">Current Outfit</string>
<string name="InvFolder Initial Outfits">Initial Outfits</string>
<string name="InvFolder My Outfits">My Outfits</string>
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index b759eed738..72d7493a02 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -1211,9 +1211,6 @@ Intenta iniciar sesión de nuevo en unos instantes.
<string name="InvFolder My Inventory">
Mi Inventario
</string>
- <string name="InvFolder My Favorites">
- Mis Favoritos
- </string>
<string name="InvFolder Library">
Biblioteca
</string>
@@ -1272,10 +1269,10 @@ Intenta iniciar sesión de nuevo en unos instantes.
Gestos
</string>
<string name="InvFolder Favorite">
- Favoritos
+ Mis Favoritos
</string>
<string name="InvFolder favorite">
- Favoritos
+ Mis Favoritos
</string>
<string name="InvFolder Current Outfit">
Vestuario actual
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 3ec85551da..077e545851 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -1238,9 +1238,6 @@ Veuillez réessayer de vous connecter dans une minute.
<string name="InvFolder My Inventory">
Mon inventaire
</string>
- <string name="InvFolder My Favorites">
- Mes Favoris
- </string>
<string name="InvFolder Library">
Bibliothèque
</string>
@@ -1299,10 +1296,10 @@ Veuillez réessayer de vous connecter dans une minute.
Gestes
</string>
<string name="InvFolder Favorite">
- Favoris
+ Mes Favoris
</string>
<string name="InvFolder favorite">
- Favoris
+ Mes Favoris
</string>
<string name="InvFolder Current Outfit">
Tenue actuelle
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index cbe8ef24c4..6af515d82d 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -1217,9 +1217,6 @@ Prova ad accedere nuovamente tra un minuto.
<string name="InvFolder My Inventory">
Il mio inventario
</string>
- <string name="InvFolder My Favorites">
- I miei preferiti
- </string>
<string name="InvFolder Library">
Libreria
</string>
@@ -1278,10 +1275,10 @@ Prova ad accedere nuovamente tra un minuto.
Gesture
</string>
<string name="InvFolder Favorite">
- Preferiti
+ I miei preferiti
</string>
<string name="InvFolder favorite">
- Preferiti
+ I miei preferiti
</string>
<string name="InvFolder Current Outfit">
Abbigliamento attuale
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index ff22221aab..fa6d25d238 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -1238,9 +1238,6 @@ support@secondlife.com にお問い合わせください。
<string name="InvFolder My Inventory">
持ち物
</string>
- <string name="InvFolder My Favorites">
- お気に入り
- </string>
<string name="InvFolder Library">
ライブラリ
</string>
diff --git a/indra/newview/skins/default/xui/nl/strings.xml b/indra/newview/skins/default/xui/nl/strings.xml
index a53c0769dc..e9db237e82 100644
--- a/indra/newview/skins/default/xui/nl/strings.xml
+++ b/indra/newview/skins/default/xui/nl/strings.xml
@@ -849,9 +849,6 @@
<string name="InvFolder My Inventory">
Mijn Inventaris
</string>
- <string name="InvFolder My Favorites">
- Mijn Favorieten
- </string>
<string name="InvFolder Library">
Bibliotheek
</string>
@@ -910,10 +907,10 @@
Gebaren
</string>
<string name="InvFolder Favorite">
- Favoriten
+ Mijn Favorieten
</string>
<string name="InvFolder favorite">
- Favoriten
+ Mijn Favorieten
</string>
<string name="InvFolder Current Outfit">
Huidige Uitrusting
diff --git a/indra/newview/skins/default/xui/pl/strings.xml b/indra/newview/skins/default/xui/pl/strings.xml
index 6eceed46d3..e93da48dc0 100644
--- a/indra/newview/skins/default/xui/pl/strings.xml
+++ b/indra/newview/skins/default/xui/pl/strings.xml
@@ -1072,9 +1072,6 @@
<string name="InvFolder My Inventory">
Moja Szafa
</string>
- <string name="InvFolder My Favorites">
- Moje ulubione
- </string>
<string name="InvFolder Library">
Biblioteka
</string>
@@ -1133,10 +1130,10 @@
Gesturki
</string>
<string name="InvFolder Favorite">
- Ulubione
+ Moje ulubione
</string>
<string name="InvFolder favorite">
- Ulubione
+ Moje ulubione
</string>
<string name="InvFolder Current Outfit">
Obecny strój
diff --git a/indra/newview/skins/default/xui/pt/strings.xml b/indra/newview/skins/default/xui/pt/strings.xml
index c5268966c1..ed93217d59 100644
--- a/indra/newview/skins/default/xui/pt/strings.xml
+++ b/indra/newview/skins/default/xui/pt/strings.xml
@@ -1172,9 +1172,6 @@ Titulares de contas gratuitas não poderão acessar o Second Life para acomodar
<string name="InvFolder My Inventory">
Meu inventário
</string>
- <string name="InvFolder My Favorites">
- Meus favoritos
- </string>
<string name="InvFolder Library">
Biblioteca
</string>
@@ -1233,10 +1230,10 @@ Titulares de contas gratuitas não poderão acessar o Second Life para acomodar
Gestos
</string>
<string name="InvFolder Favorite">
- Favoritos
+ Meus favoritos
</string>
<string name="InvFolder favorite">
- Favoritos
+ Meus favoritos
</string>
<string name="InvFolder Current Outfit">
Look atual
diff --git a/indra/newview/skins/default/xui/zh/strings.xml b/indra/newview/skins/default/xui/zh/strings.xml
index 986ab82523..28b8cce5b2 100644
--- a/indra/newview/skins/default/xui/zh/strings.xml
+++ b/indra/newview/skins/default/xui/zh/strings.xml
@@ -1099,9 +1099,6 @@
<string name="InvFolder My Inventory">
我的收納區
</string>
- <string name="InvFolder My Favorites">
- My Favorites
- </string>
<string name="InvFolder Library">
Library
</string>
@@ -1160,10 +1157,10 @@
姿勢
</string>
<string name="InvFolder Favorite">
- Favorites
+ My Favorites
</string>
<string name="InvFolder favorite">
- Favorites
+ My Favorites
</string>
<string name="InvFolder Current Outfit">
目前裝扮