Formatting.

This commit is contained in:
Jeff Young 2021-08-02 01:52:58 +01:00
parent 2a2dc1c0ff
commit 6f1837b300
2 changed files with 11 additions and 13 deletions

View File

@ -69,8 +69,8 @@ SETTINGS_MANAGER::SETTINGS_MANAGER( bool aHeadless ) :
m_ok = true;
// create the common settings shared by all applications. Not loaded immediately
m_common_settings =
static_cast<COMMON_SETTINGS*>( RegisterSettings( new COMMON_SETTINGS, false ) );
m_common_settings = static_cast<COMMON_SETTINGS*>( RegisterSettings( new COMMON_SETTINGS,
false ) );
loadAllColorSettings();
}
@ -172,8 +172,6 @@ void SETTINGS_MANAGER::FlushAndRelease( JSON_SETTINGS* aSettings, bool aSave )
m_app_settings_cache.erase( typeHash );
m_settings.erase( it );
}
}
@ -212,9 +210,7 @@ COLOR_SETTINGS* SETTINGS_MANAGER::loadColorSettingsByName( const wxString& aName
RegisterSettings( new COLOR_SETTINGS( aName.ToStdString() ) ) );
if( cs->GetFilename() != aName.ToStdString() )
{
wxLogTrace( traceSettings, "Warning: stored filename is actually %s, ", cs->GetFilename() );
}
m_color_settings[aName] = cs;

View File

@ -643,9 +643,9 @@ bool PCBNEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
}
std::string key( pluginTokenizer.GetNextToken().ToUTF8() );
bool value( pluginTokenizer.GetNextToken().Cmp( wxT( "Visible" ) ) == 0 );
js.push_back( nlohmann::json( {
{ key, pluginTokenizer.GetNextToken().Cmp( wxT( "Visible" ) ) == 0 } } ) );
js.push_back( nlohmann::json( { { key, value } } ) );
}
}
@ -743,7 +743,9 @@ bool PCBNEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
COLOR_SETTINGS* cs = Pgm().GetSettingsManager().GetMigratedColorSettings();
auto migrateLegacyColor = [&] ( const std::string& aKey, int aLayerId ) {
auto migrateLegacyColor =
[&] ( const std::string& aKey, int aLayerId )
{
wxString str;
if( aCfg->Read( aKey, &str ) )