Unbind events in DIALOG_PCM destructor

Maybe fixes KICAD-KR


(cherry picked from commit b00871ad77)
This commit is contained in:
Marek Roszko 2023-10-01 20:17:53 -04:00 committed by Mark Roszko
parent 6096b5c4d8
commit e6e29b6c4c
1 changed files with 4 additions and 0 deletions

View File

@ -184,6 +184,10 @@ DIALOG_PCM::DIALOG_PCM( wxWindow* parent, std::shared_ptr<PLUGIN_CONTENT_MANAGER
DIALOG_PCM::~DIALOG_PCM()
{
Unbind( wxEVT_CLOSE_WINDOW, &DIALOG_PCM::OnCloseWindow, this );
m_sdbSizer1Cancel->Unbind( wxEVT_UPDATE_UI, &DIALOG_PCM::OnUpdateEventButtons, this );
m_sdbSizer1Apply->Unbind( wxEVT_UPDATE_UI, &DIALOG_PCM::OnUpdateEventButtons, this );
m_pcm->SaveInstalledPackages();
m_pcm->SetDialogWindow( nullptr );
m_pcm->RunBackgroundUpdate();