7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Unbind events in KISTATUSBAR destructor

This commit is contained in:
Mark Roszko 2024-08-16 02:21:37 +00:00
parent 2f7f6c48ca
commit 869a3ee21f
2 changed files with 11 additions and 1 deletions
common/widgets
include/widgets

View File

@ -107,6 +107,15 @@ KISTATUSBAR::KISTATUSBAR( int aNumberFields, wxWindow* parent, wxWindowID id ) :
}
KISTATUSBAR::~KISTATUSBAR()
{
m_notificationsButton->Unbind( wxEVT_BUTTON, &KISTATUSBAR::onNotificationsIconClick, this );
Unbind( wxEVT_SIZE, &KISTATUSBAR::onSize, this );
m_backgroundProgressBar->Unbind( wxEVT_LEFT_DOWN, &KISTATUSBAR::onBackgroundProgressClick,
this );
}
void KISTATUSBAR::onNotificationsIconClick( wxCommandEvent& aEvent )
{
wxPoint pos = m_notificationsButton->GetScreenPosition();

View File

@ -46,7 +46,8 @@ class KICOMMON_API KISTATUSBAR : public wxStatusBar
public:
KISTATUSBAR( int aNumberFields, wxWindow* parent, wxWindowID id );
public:
~KISTATUSBAR();
/**
* Set the text in a field using wxELLIPSIZE_MIDDLE option to adjust the text size
* to the field size (unfortunately, setting the wxStatusBar style to wxELLIPSIZE_MIDDLE