aboutsummaryrefslogtreecommitdiff
blob: 2f7c6e0a72d2ca644eaaf87583594f5aaea8f007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Teemu Ikonen <tpikonen@gmail.com>
Subject: Set LC_NUMERIC to "C"
Git-Branch: p/ply_numeric
Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..2aeac7daa4785a9cf0b2480f663780

Fixes reading of ascii float values in locales which use the comma as a
float separator.

 meshlab/src/meshlab/main.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meshlab/src/meshlab/main.cpp b/meshlab/src/meshlab/main.cpp
index 7058e31..e452e87 100644
--- a/meshlab/src/meshlab/main.cpp
+++ b/meshlab/src/meshlab/main.cpp
@@ -25,12 +25,16 @@
 #include <QMessageBox>
 #include "mainwindow.h"
 
+using namespace std;
+
 int main(int argc, char *argv[])
 {	 
   MeshLabApplication app(argc, argv);
   QLocale::setDefault(QLocale::C);
   QCoreApplication::setOrganizationName("VCG");
   QCoreApplication::setApplicationName("MeshLab");
+
+  std::setlocale(LC_NUMERIC, "C");
 	
 		if(argc>1)	
 		{