Browse Source

SETTINGS_MANAGER::SaveColorSettings(): Ensure the destination folder exists.

For new users, this folder noes not exists, and saving colors does not work.
If this folder does not exist, it is not created.
pull/16/head
jean-pierre charras 5 years ago
parent
commit
a0df876d58
  1. 4
      common/settings/settings_manager.cpp

4
common/settings/settings_manager.cpp

@ -326,6 +326,10 @@ void SETTINGS_MANAGER::SaveColorSettings( COLOR_SETTINGS* aSettings, const std::
( *aSettings )[ptr].update( backup );
aSettings->Load();
// Ensure the folder to store the config exists:
if( !wxDir::Exists( SETTINGS_MANAGER::GetColorSettingsPath() ) )
wxDir::Make( SETTINGS_MANAGER::GetColorSettingsPath() );
aSettings->SaveToFile( path, true );
}

Loading…
Cancel
Save