Pārlūkot izejas kodu

wxGUI/vdigit: do not crash when LC_CNUMERIC != C, related to trac https://trac.osgeo.org/grass/ticket/225

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32076 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 17 gadi atpakaļ
vecāks
revīzija
e78d6b9fcc

+ 2 - 1
gui/wxpython/gui_modules/nviz.py

@@ -1,4 +1,5 @@
-"""@package nviz.py
+"""
+@package nviz.py
 
 
 @brief 2.5/3D visialization mode for Map Display Window
 @brief 2.5/3D visialization mode for Map Display Window
 
 

+ 4 - 0
gui/wxpython/vdigit/digit.cpp

@@ -14,6 +14,8 @@
    \date 2008
    \date 2008
 */
 */
 
 
+#include <clocale>
+
 #include "driver.h"
 #include "driver.h"
 #include "digit.h"
 #include "digit.h"
 
 
@@ -24,6 +26,8 @@
 */
 */
 Digit::Digit(DisplayDriver *ddriver)
 Digit::Digit(DisplayDriver *ddriver)
 {
 {
+    setlocale(LC_NUMERIC, "C");
+
     display = ddriver;
     display = ddriver;
 
 
     if (display->mapInfo) {
     if (display->mapInfo) {

+ 3 - 0
gui/wxpython/vdigit/driver.cpp

@@ -17,6 +17,7 @@
 */
 */
 
 
 #include <cmath>
 #include <cmath>
+#include <clocale>
 
 
 #include "driver.h"
 #include "driver.h"
 
 
@@ -31,6 +32,8 @@
 */
 */
 DisplayDriver::DisplayDriver(void *device)
 DisplayDriver::DisplayDriver(void *device)
 {
 {
+    setlocale(LC_NUMERIC, "C");
+
     G_gisinit(""); /* GRASS functions */
     G_gisinit(""); /* GRASS functions */
 
 
     mapInfo = NULL;
     mapInfo = NULL;