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
This commit is contained in:
Robert Roebling
2008-06-09 09:49:39 +00:00
parent 78617c75df
commit 09958a80f7

View File

@@ -4226,8 +4226,12 @@ wxDataViewColumn* wxDataViewCtrl::GetColumn( unsigned int pos ) const
void wxDataViewCtrl::ColumnMoved( wxDataViewColumn* col, unsigned int new_pos ) void wxDataViewCtrl::ColumnMoved( wxDataViewColumn* col, unsigned int new_pos )
{ {
if (new_pos > m_cols.GetCount()) return; if (new_pos > m_cols.GetCount()) return;
// Exchange position
m_cols.DeleteContents(false);
m_cols.DeleteObject( col ); m_cols.DeleteObject( col );
m_cols.Insert( new_pos, col ); m_cols.Insert( new_pos, col );
m_cols.DeleteContents(true);
m_clientArea->UpdateDisplay(); m_clientArea->UpdateDisplay();
} }