summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llcommon/indra_constants.cpp2
-rwxr-xr-xindra/llcommon/indra_constants.h2
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp2
-rwxr-xr-xindra/newview/llfloaterpreference.cpp4
-rw-r--r--indra/newview/llpresetsmanager.cpp23
-rw-r--r--indra/newview/llpresetsmanager.h6
6 files changed, 31 insertions, 8 deletions
diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp
index f3989ee1d0..90866631fe 100755
--- a/indra/llcommon/indra_constants.cpp
+++ b/indra/llcommon/indra_constants.cpp
@@ -67,3 +67,5 @@ const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); /
const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER
const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
+
+const LLUUID IMG_BLACK_SQUARE_MALEVICH ("3b39cc01-c2d1-e194-1181-e4404978b20c"); // On dataserver
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index 02f063f5e8..6a9e777e69 100755
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -205,6 +205,8 @@ LL_COMMON_API extern const LLUUID TERRAIN_ROCK_DETAIL;
LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
+LL_COMMON_API extern const LLUUID IMG_BLACK_SQUARE_MALEVICH;
+
// radius within which a chat message is fully audible
const F32 CHAT_NORMAL_RADIUS = 20.f;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 6693c5e033..c200ecfaf8 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1804,7 +1804,7 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
{
//order is important here LLRender::DIFFUSE_MAP should be last, becouse it change
//(gGL).mCurrTextureUnitIndex
- gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP));
+ gGL.getTexUnit(specular_channel)->bind(LLPipeline::sImpostorRender ? LLViewerTextureManager::findTexture(IMG_BLACK_SQUARE_MALEVICH) : face->getTexture(LLRender::SPECULAR_MAP));
gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP));
gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP), false, true);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 06388b1728..cfaafeb496 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2474,6 +2474,10 @@ void LLPanelPreferenceGraphics::setPresetText()
if (!preset_graphic_active.empty())
{
+ if (preset_graphic_active == PRESETS_DEFAULT)
+ {
+ preset_graphic_active = LLTrans::getString("Default");
+ }
preset_text->setText(preset_graphic_active);
}
else
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 8aad37e505..152001eb46 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -134,9 +134,14 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam
presets = mPresetNames;
}
-bool LLPresetsManager::savePreset(const std::string& subdirectory, const std::string& name)
+bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string name)
{
- bool saved = false;
+ if (LLTrans::getString(PRESETS_DEFAULT) == name)
+ {
+ name = PRESETS_DEFAULT;
+ }
+
+ bool saved = false;
std::vector<std::string> name_list;
if(PRESETS_GRAPHIC == subdirectory)
@@ -244,8 +249,13 @@ void LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory,
}
}
-void LLPresetsManager::loadPreset(const std::string& subdirectory, const std::string& name)
+void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string name)
{
+ if (LLTrans::getString(PRESETS_DEFAULT) == name)
+ {
+ name = PRESETS_DEFAULT;
+ }
+
std::string full_path(getPresetsDir(subdirectory) + gDirUtilp->getDirDelimiter() + LLURI::escape(name) + ".xml");
LL_DEBUGS() << "attempting to load preset '"<<name<<"' from '"<<full_path<<"'" << LL_ENDL;
@@ -270,8 +280,13 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, const std::st
}
}
-bool LLPresetsManager::deletePreset(const std::string& subdirectory, const std::string& name)
+bool LLPresetsManager::deletePreset(const std::string& subdirectory, std::string name)
{
+ if (LLTrans::getString(PRESETS_DEFAULT) == name)
+ {
+ name = PRESETS_DEFAULT;
+ }
+
bool sts = true;
if (PRESETS_DEFAULT == name)
diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h
index ce640b49b1..ac4f0c010c 100644
--- a/indra/newview/llpresetsmanager.h
+++ b/indra/newview/llpresetsmanager.h
@@ -56,9 +56,9 @@ public:
static std::string getPresetsDir(const std::string& subdirectory);
void setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option);
void loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option);
- bool savePreset(const std::string& subdirectory, const std::string & name);
- void loadPreset(const std::string& subdirectory, const std::string & name);
- bool deletePreset(const std::string& subdirectory, const std::string& name);
+ bool savePreset(const std::string& subdirectory, std::string name);
+ void loadPreset(const std::string& subdirectory, std::string name);
+ bool deletePreset(const std::string& subdirectory, std::string name);
// Emitted when a preset gets loaded, deleted, or saved.
boost::signals2::connection setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb);