]> git.saurik.com Git - wxWidgets.git/commitdiff
blind fix for: #9549: crash in wxDataViewMainWindow::GetEndOfLastCol() after column...
authorRobert Roebling <robert@roebling.de>
Mon, 9 Jun 2008 09:49:39 +0000 (09:49 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 9 Jun 2008 09:49:39 +0000 (09:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index 458c83373ebe4ddb53fba06049d084a4ec2b8062..4cd77421b2e3b911689b95ace6eb683f90ea513d 100644 (file)
@@ -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();
 }