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 c3496d61eb
commit 4d9802760e
1 changed files with 3 additions and 0 deletions

View File

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