Set locale in python save routine

Fixes https://gitlab.com/kicad/code/kicad/issues/11006
This commit is contained in:
Seth Hillbrand 2022-08-23 09:41:11 -07:00
parent 1e09f0e8b0
commit c3496d61eb
1 changed files with 4 additions and 0 deletions

View File

@ -243,6 +243,10 @@ bool SaveBoard( wxString& aFileName, BOARD* aBoard, IO_MGR::PCB_FILE_T aFormat )
aBoard->BuildConnectivity();
aBoard->SynchronizeNetsAndNetClasses();
// Ensure the "C" locale is temporary set, before saving any file
// It also avoid wxWidget alerts about locale issues, later, when using Python 3
LOCALE_IO dummy;
try
{
IO_MGR::Save( aFormat, aFileName, aBoard, nullptr );