diff --git a/common/settings/settings_manager.cpp b/common/settings/settings_manager.cpp index c34f2a8839..733bc76765 100644 --- a/common/settings/settings_manager.cpp +++ b/common/settings/settings_manager.cpp @@ -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( RegisterSettings( new COMMON_SETTINGS, false ) ); + m_common_settings = static_cast( 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; diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index b2cfd15b7b..9fe83d13c9 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -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,12 +743,14 @@ bool PCBNEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg ) COLOR_SETTINGS* cs = Pgm().GetSettingsManager().GetMigratedColorSettings(); - auto migrateLegacyColor = [&] ( const std::string& aKey, int aLayerId ) { - wxString str; + auto migrateLegacyColor = + [&] ( const std::string& aKey, int aLayerId ) + { + wxString str; - if( aCfg->Read( aKey, &str ) ) - cs->SetColor( aLayerId, COLOR4D( str ) ); - }; + if( aCfg->Read( aKey, &str ) ) + cs->SetColor( aLayerId, COLOR4D( str ) ); + }; for( int i = 0; i < PCB_LAYER_ID_COUNT; ++i ) {