cvpcb: Auto move to next NA after association

Also perform some cleanup of objects when windows close
This commit is contained in:
Ian McInerney 2019-08-11 10:47:51 +02:00 committed by Wayne Stambaugh
parent 36b430562d
commit 7bb046c0a5
3 changed files with 9 additions and 1 deletions

View File

@ -183,6 +183,10 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
CVPCB_MAINFRAME::~CVPCB_MAINFRAME()
{
// Be sure a active tool (if exists) is deactivated:
if( m_toolManager )
m_toolManager->DeactivateTool();
// Clean up the tool infrastructure
delete m_actions;
delete m_toolManager;

View File

@ -154,12 +154,13 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa
DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME()
{
GetBoard()->DeleteAllModules();
GetCanvas()->StopDrawing();
GetCanvas()->GetView()->Clear();
// Be sure any event cannot be fired after frame deletion:
GetCanvas()->SetEvtHandlerEnabled( false );
// Be sure a active tool (if exists) is desactivated:
// Be sure a active tool (if exists) is deactivated:
if( m_toolManager )
m_toolManager->DeactivateTool();

View File

@ -215,6 +215,9 @@ int CVPCB_ASSOCIATION_TOOL::Associate( const TOOL_EVENT& aEvent )
firstAssoc = false;
}
// Move to the next not associated component
m_toolMgr->RunAction( CVPCB_ACTIONS::gotoNextNA );
return 0;
}