Be sure to stop the timer during widget destruction
Also fix a comment elsewhere :D Fixes #8772
This commit is contained in:
parent
2889861c0b
commit
759f0e9a75
|
@ -157,6 +157,9 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable,
|
||||||
|
|
||||||
LIB_TREE::~LIB_TREE()
|
LIB_TREE::~LIB_TREE()
|
||||||
{
|
{
|
||||||
|
// Stop the timer during destruction early to avoid potential race conditions (that do happen)
|
||||||
|
m_debounceTimer->Stop();
|
||||||
|
|
||||||
// Save the column widths to the config file
|
// Save the column widths to the config file
|
||||||
m_adapter->SaveColWidths();
|
m_adapter->SaveColWidths();
|
||||||
|
|
||||||
|
|
|
@ -231,6 +231,10 @@ DIALOG_CHOOSE_SYMBOL::~DIALOG_CHOOSE_SYMBOL()
|
||||||
Unbind( SYMBOL_PRESELECTED, &DIALOG_CHOOSE_SYMBOL::OnComponentPreselected, this );
|
Unbind( SYMBOL_PRESELECTED, &DIALOG_CHOOSE_SYMBOL::OnComponentPreselected, this );
|
||||||
Unbind( SYMBOL_SELECTED, &DIALOG_CHOOSE_SYMBOL::OnComponentSelected, this );
|
Unbind( SYMBOL_SELECTED, &DIALOG_CHOOSE_SYMBOL::OnComponentSelected, this );
|
||||||
|
|
||||||
|
// Stop the timer during destruction early to avoid potential race conditions (that do happen)
|
||||||
|
m_dbl_click_timer->Stop();
|
||||||
|
delete m_dbl_click_timer;
|
||||||
|
|
||||||
if( m_browser_button )
|
if( m_browser_button )
|
||||||
{
|
{
|
||||||
m_browser_button->Unbind( wxEVT_COMMAND_BUTTON_CLICKED,
|
m_browser_button->Unbind( wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
|
@ -249,10 +253,6 @@ DIALOG_CHOOSE_SYMBOL::~DIALOG_CHOOSE_SYMBOL()
|
||||||
wxKeyEventHandler( DIALOG_CHOOSE_SYMBOL::OnCharHook ), NULL, this );
|
wxKeyEventHandler( DIALOG_CHOOSE_SYMBOL::OnCharHook ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
// I am not sure the following two lines are necessary, but they will not hurt anyone
|
|
||||||
m_dbl_click_timer->Stop();
|
|
||||||
delete m_dbl_click_timer;
|
|
||||||
|
|
||||||
if( EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ) )
|
if( EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ) )
|
||||||
{
|
{
|
||||||
cfg->m_SymChooserPanel.width = GetSize().x;
|
cfg->m_SymChooserPanel.width = GetSize().x;
|
||||||
|
|
Loading…
Reference in New Issue