Don't steal unrelated timer events (potentially KICAD-XJN).

This commit is contained in:
Jeff Young 2025-07-13 16:30:03 +01:00
parent 1b24c0a72b
commit d3046e6aee
5 changed files with 14 additions and 8 deletions

View File

@ -44,7 +44,7 @@ STATUS_POPUP::STATUS_POPUP( wxWindow* aParent ) :
m_panel->SetSizer( m_topSizer );
m_panel->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
Connect( wxEVT_TIMER, wxTimerEventHandler( STATUS_POPUP::onExpire ), nullptr, this );
Connect( m_expireTimer.GetId(), wxEVT_TIMER, wxTimerEventHandler( STATUS_POPUP::onExpire ), nullptr, this );
#ifdef __WXOSX_MAC__
// Key events from popups don't get put through the wxWidgets event system on OSX,

View File

@ -759,6 +759,12 @@ void SCH_BASE_FRAME::OnSymChange( wxFileSystemWatcherEvent& aEvent )
void SCH_BASE_FRAME::OnSymChangeDebounceTimer( wxTimerEvent& aEvent )
{
if( aEvent.GetId() != m_watcherDebounceTimer.GetId() )
{
aEvent.Skip();
return;
}
wxLogTrace( "KICAD_LIB_WATCH", "OnSymChangeDebounceTimer" );
// Disable logging to avoid spurious messages and check if the file has changed

View File

@ -348,8 +348,8 @@ bool SCH_SELECTION_TOOL::Init()
// clang-format on
m_disambiguateTimer.SetOwner( this );
Connect( wxEVT_TIMER, wxTimerEventHandler( SCH_SELECTION_TOOL::onDisambiguationExpire ),
nullptr, this );
Connect( m_disambiguateTimer.GetId(), wxEVT_TIMER,
wxTimerEventHandler( SCH_SELECTION_TOOL::onDisambiguationExpire ), nullptr, this );
return true;
}

View File

@ -67,7 +67,8 @@ bool PL_SELECTION_TOOL::Init()
m_frame->AddStandardSubMenus( *m_menu.get() );
m_disambiguateTimer.SetOwner( this );
Connect( wxEVT_TIMER, wxTimerEventHandler( PL_SELECTION_TOOL::onDisambiguationExpire ), nullptr, this );
Connect( m_disambiguateTimer.GetId(), wxEVT_TIMER,
wxTimerEventHandler( PL_SELECTION_TOOL::onDisambiguationExpire ), nullptr, this );
return true;
}

View File

@ -153,8 +153,7 @@ PCB_SELECTION_TOOL::~PCB_SELECTION_TOOL()
getView()->Remove( &m_selection );
getView()->Remove( &m_enteredGroupOverlay );
Disconnect( wxEVT_TIMER, wxTimerEventHandler( PCB_SELECTION_TOOL::onDisambiguationExpire ),
nullptr, this );
Disconnect( wxEVT_TIMER, wxTimerEventHandler( PCB_SELECTION_TOOL::onDisambiguationExpire ), nullptr, this );
}
@ -227,8 +226,8 @@ bool PCB_SELECTION_TOOL::Init()
frame->AddStandardSubMenus( *m_menu.get() );
m_disambiguateTimer.SetOwner( this );
Connect( wxEVT_TIMER, wxTimerEventHandler( PCB_SELECTION_TOOL::onDisambiguationExpire ),
nullptr, this );
Connect( m_disambiguateTimer.GetId(), wxEVT_TIMER,
wxTimerEventHandler( PCB_SELECTION_TOOL::onDisambiguationExpire ), nullptr, this );
return true;
}