Skip to content

Commit

Permalink
Work around Delete all items issue with generic listctrl
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Mar 31, 2024
1 parent b4e7428 commit 335b200
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/controls/listctrlex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ ListCtrlEx::ListCtrlEx(wxWindow* parent, const wxWindowID id,
//------------------------------------------------------
ListCtrlEx::~ListCtrlEx()
{
// Under GTK+, DoDeleteAllItems() is called from the base DTOR,
// so need to unbind this event. Otherwise, our method in this derived
// class will be called after destruction.
Unbind(wxEVT_LIST_DELETE_ALL_ITEMS, &ListCtrlEx::OnDeleteAllItems, this);

wxDELETE(m_menu);
wxDELETE(m_editTextCtrl);
wxDELETE(m_editSpinCtrl);
Expand Down

0 comments on commit 335b200

Please sign in to comment.