Fix incorrect (not updated) canvas_type saved in config

This commit is contained in:
jean-pierre charras 2021-06-19 10:11:49 +02:00
parent 5a832fc337
commit 2f9ce63623
2 changed files with 6 additions and 0 deletions

View File

@ -202,6 +202,9 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent )
GERBVIEW_FRAME::~GERBVIEW_FRAME()
{
// Ensure m_canvasType is up to date, to save it in config
m_canvasType = GetCanvas()->GetBackend();
// Shutdown all running tools
if( m_toolManager )
m_toolManager->ShutdownAllTools();

View File

@ -222,6 +222,9 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
PL_EDITOR_FRAME::~PL_EDITOR_FRAME()
{
// Ensure m_canvasType is up to date, to save it in config
m_canvasType = GetCanvas()->GetBackend();
// Shutdown all running tools
if( m_toolManager )
m_toolManager->ShutdownAllTools();