cvpcb: Auto move to next NA after association
Also perform some cleanup of objects when windows close
This commit is contained in:
parent
36b430562d
commit
7bb046c0a5
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue