Eeschema: canvas background color: all frame are now using the same parameter.

fix recent bug which prevent eeschema to save color preferences.
fix few other minor issues.
This commit is contained in:
jean-pierre charras
2014-09-26 12:35:11 +02:00
parent ea06ad14ae
commit 9bcdef85cd
14 changed files with 130 additions and 77 deletions
+5 -6
View File
@@ -507,13 +507,13 @@ void LIB_VIEW_FRAME::LoadSettings( wxConfigBase* aCfg )
{
EDA_DRAW_FRAME::LoadSettings( aCfg );
SetGridColor( GetLayerColor( LAYER_GRID ) );
SetDrawBgColor( GetLayerColor( LAYER_BACKGROUND ) );
wxConfigPathChanger cpc( aCfg, m_configPath );
EDA_COLOR_T itmp = ColorByName( aCfg->Read( LIBVIEW_BGCOLOR, wxT( "WHITE" ) ) );
SetDrawBgColor( itmp );
aCfg->Read( LIBLIST_WIDTH_KEY, &m_libListWidth, 100 );
aCfg->Read( CMPLIST_WIDTH_KEY, &m_cmpListWidth, 100 );
aCfg->Read( LIBLIST_WIDTH_KEY, &m_libListWidth, 150 );
aCfg->Read( CMPLIST_WIDTH_KEY, &m_cmpListWidth, 150 );
// Set parameters to a reasonable value.
if( m_libListWidth > m_FrameSize.x/2 )
@@ -538,7 +538,6 @@ void LIB_VIEW_FRAME::SaveSettings( wxConfigBase* aCfg )
m_cmpListWidth = m_cmpList->GetSize().x;
aCfg->Write( CMPLIST_WIDTH_KEY, m_cmpListWidth );
aCfg->Write( LIBVIEW_BGCOLOR, ColorGetName( GetDrawBgColor() ) );
}