X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5c479ccfc9adf26d4cc8515bfbdb3230bd934b6..172541f64be8fcddb08f1c121da256d08c24a70b:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index ee141260ec..1d3d6605ec 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2263,6 +2263,7 @@ wxListMainWindow::~wxListMainWindow() { DoDeleteAllItems(); WX_CLEAR_LIST(wxListHeaderDataList, m_columns); + WX_CLEAR_ARRAY(m_aColWidths); delete m_highlightBrush; delete m_highlightUnfocusedBrush; @@ -4353,7 +4354,7 @@ void wxListMainWindow::DoDeleteAllItems() ResetVisibleLinesRange(); for (size_t i = 0; i < m_aColWidths.GetCount(); i++) { - delete m_aColWidths.Item(i); + m_aColWidths.Item(i)->bNeedsUpdate = true; } } @@ -4370,6 +4371,7 @@ void wxListMainWindow::DeleteAllItems() void wxListMainWindow::DeleteEverything() { WX_CLEAR_LIST(wxListHeaderDataList, m_columns); + WX_CLEAR_ARRAY(m_aColWidths); DeleteAllItems(); }