GerbView: properly load worksheet visibility at startup

This commit is contained in:
Jon Evans 2019-05-25 16:58:10 -04:00
parent f101934909
commit 5d1dcb4387
1 changed files with 4 additions and 2 deletions

View File

@ -350,7 +350,9 @@ void GERBVIEW_FRAME::LoadSettings( wxConfigBase* aCfg )
// was: wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
wxConfigLoadSetups( aCfg, GetConfigurationSettings() );
aCfg->Read( cfgShowBorderAndTitleBlock, &m_showBorderAndTitleBlock, false );
bool tmp;
aCfg->Read( cfgShowBorderAndTitleBlock, &tmp, false );
SetElementVisibility( LAYER_WORKSHEET, tmp );
PAGE_INFO pageInfo( wxT( "GERBER" ) );
wxString pageType;
@ -359,7 +361,6 @@ void GERBVIEW_FRAME::LoadSettings( wxConfigBase* aCfg )
pageInfo.SetType( pageType );
SetPageSettings( pageInfo );
bool tmp;
aCfg->Read( cfgShowDCodes, &tmp, true );
SetElementVisibility( LAYER_DCODES, tmp );
aCfg->Read( cfgShowNegativeObjects, &tmp, false );
@ -468,6 +469,7 @@ void GERBVIEW_FRAME::SetElementVisibility( int aLayerID, bool aNewState )
case LAYER_WORKSHEET:
m_showBorderAndTitleBlock = aNewState;
GetGalCanvas()->GetView()->SetLayerVisible( LAYER_WORKSHEET, aNewState );
break;
case LAYER_GERBVIEW_GRID: