Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
0545f681
Commit
0545f681
authored
Oct 01, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
track locale switching better in the event of errors
parent
07ef1709
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
gen_modules_placefile.cpp
pcbnew/gen_modules_placefile.cpp
+5
-1
No files found.
pcbnew/gen_modules_placefile.cpp
View file @
0545f681
...
@@ -79,6 +79,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
...
@@ -79,6 +79,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
wxString
Title
;
wxString
Title
;
FILE
*
fpFront
=
NULL
;
FILE
*
fpFront
=
NULL
;
FILE
*
fpBack
=
NULL
;
FILE
*
fpBack
=
NULL
;
bool
switchedLocale
=
false
;
/* Calcul des echelles de conversion */
/* Calcul des echelles de conversion */
float
conv_unit
=
0.0001
;
/* unites = INCHES */
float
conv_unit
=
0.0001
;
/* unites = INCHES */
...
@@ -159,6 +160,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
...
@@ -159,6 +160,7 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
// Switch the locale to standard C (needed to print floating point numbers like 1.3)
SetLocaleTo_C_standard
(
);
SetLocaleTo_C_standard
(
);
switchedLocale
=
true
;
/* Affichage du bilan : */
/* Affichage du bilan : */
MsgPanel
->
EraseMsgBox
();
MsgPanel
->
EraseMsgBox
();
...
@@ -264,7 +266,6 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
...
@@ -264,7 +266,6 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
fputs
(
"## End
\n
"
,
fpBack
);
fputs
(
"## End
\n
"
,
fpBack
);
MyFree
(
Liste
);
MyFree
(
Liste
);
SetLocaleTo_Default
(
);
// revert to the current locale
msg
=
frontLayerName
+
wxT
(
" File: "
)
+
fnFront
;
msg
=
frontLayerName
+
wxT
(
" File: "
)
+
fnFront
;
...
@@ -274,6 +275,9 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
...
@@ -274,6 +275,9 @@ void WinEDA_PcbFrame::GenModulesPosition( wxCommandEvent& event )
DisplayInfo
(
this
,
msg
);
DisplayInfo
(
this
,
msg
);
exit
:
exit
:
if
(
switchedLocale
)
SetLocaleTo_Default
(
);
// revert to the current locale
if
(
fpFront
)
if
(
fpFront
)
fclose
(
fpFront
);
fclose
(
fpFront
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment