Fix Linux build

This commit is contained in:
Jon Evans 2020-02-29 22:20:29 -05:00
parent 90bd351807
commit 7825809b3a
1 changed files with 4 additions and 4 deletions

View File

@ -117,10 +117,10 @@ bool GERBVIEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
COLOR_SETTINGS* cs = Pgm().GetSettingsManager().GetColorSettings(); COLOR_SETTINGS* cs = Pgm().GetSettingsManager().GetColorSettings();
auto migrateLegacyColor = [&] ( const std::string& aKey, int aLayerId ) { auto migrateLegacyColor = [&] ( const std::string& aKey, int aLayerId ) {
wxString str; wxString str;
if( aCfg->Read( aKey, &str ) ) if( aCfg->Read( aKey, &str ) )
cs->SetColor( aLayerId, COLOR4D( str ) ); cs->SetColor( aLayerId, COLOR4D( str ) );
}; };
migrateLegacyColor( "BackgroundColorEx", LAYER_GERBVIEW_BACKGROUND ); migrateLegacyColor( "BackgroundColorEx", LAYER_GERBVIEW_BACKGROUND );
@ -135,7 +135,7 @@ bool GERBVIEW_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
id < GERBER_DRAWLAYERS_COUNT + GERBVIEW_LAYER_ID_START; ++i, ++id ) id < GERBER_DRAWLAYERS_COUNT + GERBVIEW_LAYER_ID_START; ++i, ++id )
{ {
key.Printf( "ColorLayer%dEx", i ); key.Printf( "ColorLayer%dEx", i );
migrateLegacyColor( key, id ); migrateLegacyColor( key.ToStdString(), id );
} }
Pgm().GetSettingsManager().SaveColorSettings( cs, "gerbview" ); Pgm().GetSettingsManager().SaveColorSettings( cs, "gerbview" );