pcbnew: Clear view prior to terminating

On complex boards, the view holds a very large vector of all objects.
The dtor will remove each one, searching for the pointer before
removing.  When removing all items, this process is not needed, so we
clear the view when exiting.  This also prevents lock-up when closing
the full application as KiCad waits for the dtor to finish
(non-interactively).  This will cause Windows to crash and Linux to
offer an option for terminating the non-responsive application.

Fixes: lp:1843092
* https://bugs.launchpad.net/kicad/+bug/1843092
This commit is contained in:
Seth Hillbrand 2019-09-23 06:41:44 -07:00
parent cd6c1c48a4
commit 7f54617dab
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME()
{
wxTextFile footprintInfoCache( Prj().GetProjectPath() + "fp-info-cache" );
GFootprintList.WriteCacheToFile( &footprintInfoCache );
GetCanvas()->GetView()->Clear();
}