Add RemoveAllListeners function for future addons
This commit is contained in:
parent
cfb6fcf31a
commit
3e451ca516
|
@ -1966,6 +1966,12 @@ void BOARD::RemoveListener( BOARD_LISTENER* aListener )
|
|||
}
|
||||
|
||||
|
||||
void BOARD::RemoveAllListeners()
|
||||
{
|
||||
m_listeners.clear();
|
||||
}
|
||||
|
||||
|
||||
void BOARD::OnItemChanged( BOARD_ITEM* aItem )
|
||||
{
|
||||
InvokeListeners( &BOARD_LISTENER::OnBoardItemChanged, *this, aItem );
|
||||
|
|
|
@ -1081,6 +1081,11 @@ public:
|
|||
*/
|
||||
void RemoveListener( BOARD_LISTENER* aListener );
|
||||
|
||||
/**
|
||||
* Remove all listeners
|
||||
*/
|
||||
void RemoveAllListeners();
|
||||
|
||||
/**
|
||||
* Notify the board and its listeners that an item on the board has
|
||||
* been modified in some way.
|
||||
|
|
|
@ -448,7 +448,7 @@ PCB_EDIT_FRAME::~PCB_EDIT_FRAME()
|
|||
m_toolManager->ShutdownAllTools();
|
||||
|
||||
if( GetBoard() )
|
||||
GetBoard()->RemoveListener( m_appearancePanel );
|
||||
GetBoard()->RemoveAllListeners();
|
||||
|
||||
delete m_selectionFilterPanel;
|
||||
delete m_appearancePanel;
|
||||
|
|
Loading…
Reference in New Issue