Disconnect EDA_DRAW_PANEL_GAL::onShowEvent handler in dtor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20754
This commit is contained in:
Alex Shvartzkop 2025-04-24 19:32:22 +03:00
parent a65fe79551
commit 2b2b7d2232

View File

@ -439,6 +439,8 @@ void EDA_DRAW_PANEL_GAL::StopDrawing()
m_refreshTimer.Stop(); m_refreshTimer.Stop();
m_drawingEnabled = false; m_drawingEnabled = false;
Disconnect( wxEVT_SHOW, wxShowEventHandler( EDA_DRAW_PANEL_GAL::onShowEvent ), nullptr, this );
Disconnect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), nullptr, this ); Disconnect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), nullptr, this );
Disconnect( wxEVT_IDLE, wxIdleEventHandler( EDA_DRAW_PANEL_GAL::onIdle ), nullptr, this ); Disconnect( wxEVT_IDLE, wxIdleEventHandler( EDA_DRAW_PANEL_GAL::onIdle ), nullptr, this );