Fix an issue in LOCALE_IO class, used to switch to/back locale "C" when reading/writing files: the back to locale was broken, and created issues in countries using the ',' as fp separator, especially when the non default language was used.

It was reported in many bugs.
This commit is contained in:
jean-pierre charras
2016-05-10 09:11:09 +02:00
parent bfeb61abef
commit ec096cc1d2
6 changed files with 51 additions and 89 deletions
+1 -2
View File
@@ -66,6 +66,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
wxString msg;
wxFileName plotFileName;
REPORTER& reporter = m_MessagesBox->Reporter();
LOCALE_IO toggle; // Switch the locale to standard C
for( unsigned i = 0; i < sheetList.size(); i++ )
{
@@ -94,7 +95,6 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotFrameRef )
}
// Open the plotter and do the first page
SetLocaleTo_C_standard();
setupPlotPagePDF( plotter, screen );
plotter->StartPlot();
}
@@ -134,7 +134,6 @@ void DIALOG_PLOT_SCHEMATIC::restoreEnvironment( PDF_PLOTTER* aPlotter,
{
aPlotter->EndPlot();
delete aPlotter;
SetLocaleTo_Default();
// Restore the previous sheet
m_parent->SetCurrentSheet( aOldsheetpath );