From 6f799b0a587c53587edd1dbef8ec69ca974b9a85 Mon Sep 17 00:00:00 2001
From: Ansariel <none@none>
Date: Thu, 10 Mar 2016 10:00:03 +0100
Subject: [PATCH] Fix default preset not shown as selected in quick graphics
 pulldown for non-english languages

---
 indra/newview/llfloaterpreference.cpp    | 2 +-
 indra/newview/llpanelpresetspulldown.cpp | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index c4e9292d90b..3a0abc919fe 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2521,7 +2521,7 @@ void LLPanelPreferenceGraphics::setPresetText()
 	{
 		if (preset_graphic_active == PRESETS_DEFAULT)
 		{
-			preset_graphic_active = LLTrans::getString("Default");
+			preset_graphic_active = LLTrans::getString(PRESETS_DEFAULT);
 		}
 		preset_text->setText(preset_graphic_active);
 	}
diff --git a/indra/newview/llpanelpresetspulldown.cpp b/indra/newview/llpanelpresetspulldown.cpp
index 70f5fcd2c06..9b4dc5474a0 100644
--- a/indra/newview/llpanelpresetspulldown.cpp
+++ b/indra/newview/llpanelpresetspulldown.cpp
@@ -38,6 +38,7 @@
 #include "llpresetsmanager.h"
 #include "llsliderctrl.h"
 #include "llscrolllistctrl.h"
+#include "lltrans.h"
 
 /* static */ const F32 LLPanelPresetsPulldown::sAutoCloseFadeStartTimeSec = 2.0f;
 /* static */ const F32 LLPanelPresetsPulldown::sAutoCloseTotalTimeSec = 3.0f;
@@ -80,6 +81,12 @@ void LLPanelPresetsPulldown::populatePanel()
 	{
 		scroll->clearRows();
 
+		std::string active_preset = gSavedSettings.getString("PresetGraphicActive");
+		if (active_preset == PRESETS_DEFAULT)
+		{
+			active_preset = LLTrans::getString(PRESETS_DEFAULT);
+		}
+
 		for (std::list<std::string>::const_iterator it = mPresetNames.begin(); it != mPresetNames.end(); ++it)
 		{
 			const std::string& name = *it;
@@ -90,7 +97,7 @@ void LLPanelPresetsPulldown::populatePanel()
 			row["columns"][0]["value"] = name;
 
 			bool is_selected_preset = false;
-			if (name == gSavedSettings.getString("PresetGraphicActive"))
+			if (name == active_preset)
 			{
 				row["columns"][1]["column"] = "icon";
 				row["columns"][1]["type"] = "icon";
-- 
GitLab