From 09958a80f798b6950cc9318f5baa3bced5facaa5 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 9 Jun 2008 09:49:39 +0000 Subject: [PATCH] blind fix for: #9549: crash in wxDataViewMainWindow::GetEndOfLastCol() after column reordering git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 458c83373e..4cd77421b2 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4226,8 +4226,12 @@ wxDataViewColumn* wxDataViewCtrl::GetColumn( unsigned int pos ) const void wxDataViewCtrl::ColumnMoved( wxDataViewColumn* col, unsigned int new_pos ) { if (new_pos > m_cols.GetCount()) return; + + // Exchange position + m_cols.DeleteContents(false); m_cols.DeleteObject( col ); m_cols.Insert( new_pos, col ); + m_cols.DeleteContents(true); m_clientArea->UpdateDisplay(); } -- 2.50.0