Set locale in SaveToFile routine before calling json stuff.

It avoid wxWidgets alerts about locale when running some python scripts
This commit is contained in:
jean-pierre charras 2022-08-23 20:38:16 +02:00
parent 8a6a0ff7dc
commit 27c31061b1
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <settings/json_settings_internals.h>
#include <settings/nested_settings.h>
#include <locale_io.h>
NESTED_SETTINGS::NESTED_SETTINGS( const std::string& aName, int aVersion, JSON_SETTINGS* aParent,
const std::string& aPath ) :
@ -116,6 +117,8 @@ bool NESTED_SETTINGS::SaveToFile( const wxString& aDirectory, bool aForce )
if( !m_parent )
return false;
LOCALE_IO dummy;
try
{
bool modified = Store();