Fix gerbview initialization order issue.

This commit is contained in:
Jeff Young 2019-05-27 20:07:59 +01:00
parent ce4c4c9409
commit 39d769937f
1 changed files with 5 additions and 11 deletions

View File

@ -78,10 +78,6 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
// obviously depends on the monitor,
// but this is an acceptable value
// Be sure a page info is set. this default value will be overwritten later.
PAGE_INFO pageInfo( wxT( "GERBER" ) );
SetPageSettings( pageInfo );
m_show_layer_manager_tools = true;
m_showAxis = true; // true to show X and Y axis on screen
@ -117,7 +113,10 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
icon.CopyFromBitmap( KiBitmap( icon_gerbview_xpm ) );
SetIcon( icon );
// Be sure a page info is set. this default value will be overwritten later.
PAGE_INFO pageInfo( wxT( "GERBER" ) );
SetLayout( new GBR_LAYOUT() );
SetPageSettings( pageInfo );
SetVisibleLayers( LSET::AllLayersMask() ); // All draw layers visible.
@ -212,15 +211,10 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
m_firstRunDialogSetting = 1;
SaveSettings( config() );
}
else
{
GetGalCanvas()->SwitchBackend( canvasType );
UseGalCanvas( true );
wxUpdateUIEvent e;
OnUpdateSwitchCanvas( e );
}
// Enable the axes to match legacy draw style
auto& galOptions = GetGalDisplayOptions();
galOptions.m_axesEnabled = true;