Enable the accelerated canvas on the first gerbview run if requested

Commit 8910894f applied to gerbview.
This commit is contained in:
Maciej Suminski 2018-06-04 10:47:44 +02:00
parent 8910894fab
commit 27c9c6ceed
1 changed files with 5 additions and 13 deletions

View File

@ -231,27 +231,19 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
auto handler = GetEventHandler();
handler->ProcessEvent( evt );
}
else
else if( canvasType == EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
{
// If they were on legacy, switch them to Cairo
if( canvasType == EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
{
wxCommandEvent evt( wxEVT_MENU, ID_MENU_CANVAS_CAIRO );
auto handler = GetEventHandler();
handler->ProcessEvent( evt );
}
wxCommandEvent evt( wxEVT_MENU, ID_MENU_CANVAS_CAIRO );
auto handler = GetEventHandler();
handler->ProcessEvent( evt );
}
}
m_firstRunDialogSetting = 1;
SaveSettings( config() );
}
// Canvas may have been updated by the dialog
canvasType = loadCanvasTypeSetting();
if( canvasType != EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
else if( canvasType != EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
{
if( GetGalCanvas()->SwitchBackend( canvasType ) )
UseGalCanvas( true );