Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/imgui
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2021-07-15 14:38:53 +0300
committerLukas Matena <lukasmatena@seznam.cz>2021-07-15 14:38:57 +0300
commitb71d787f695c779e571865d5214d4da8d50aa7c5 (patch)
treed224340e247d1781bbba7b15ed5d259d0de5bf15 /src/imgui
parentb8c949ea717df345b9b61925dc220d4f1d00b2f7 (diff)
ImGui keyboard input fields are now locale-sensitive
Diffstat (limited to 'src/imgui')
-rw-r--r--src/imgui/imgui_widgets.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/imgui/imgui_widgets.cpp b/src/imgui/imgui_widgets.cpp
index 46d2174fe..2258f61b5 100644
--- a/src/imgui/imgui_widgets.cpp
+++ b/src/imgui/imgui_widgets.cpp
@@ -40,6 +40,8 @@ Index of this file:
#endif
#include "imgui_internal.h"
+#include <locale.h>
+
// System includes
#include <ctype.h> // toupper
#if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier
@@ -3804,7 +3806,7 @@ static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTextFlags f
// The standard mandate that programs starts in the "C" locale where the decimal point is '.'.
// We don't really intend to provide widespread support for it, but out of empathy for people stuck with using odd API, we support the bare minimum aka overriding the decimal point.
// Change the default decimal_point with:
- // ImGui::GetCurrentContext()->PlatformLocaleDecimalPoint = *localeconv()->decimal_point;
+ ImGui::GetCurrentContext()->PlatformLocaleDecimalPoint = *localeconv()->decimal_point;
ImGuiContext& g = *GImGui;
const unsigned c_decimal_point = (unsigned int)g.PlatformLocaleDecimalPoint;