]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
move 8 copies of the same function to common code
[wxWidgets.git] / 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();
 }