Send wxEVT_DATAVIEW_COLUMN_REORDERED in generic wxDataViewCtrl

Simply translate wxEVT_HEADER_END_REORDER into this event, which was
previously only sent by the macOS version.

GtkTreeView doesn't seem to support column drag-and-drop at all, so this
event is still never generated by wxGTK.

Closes #14297.
This commit is contained in:
Vadim Zeitlin
2018-02-04 15:45:23 +01:00
parent f33f1f2078
commit 48fb2b42b1
5 changed files with 28 additions and 6 deletions

View File

@@ -5512,13 +5512,16 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const
return max_width;
}
void wxDataViewCtrl::ColumnMoved(wxDataViewColumn * WXUNUSED(col),
unsigned int WXUNUSED(new_pos))
void wxDataViewCtrl::ColumnMoved(wxDataViewColumn *col, unsigned int new_pos)
{
// do _not_ reorder m_cols elements here, they should always be in the
// order in which columns were added, we only display the columns in
// different order
m_clientArea->UpdateDisplay();
wxDataViewEvent event(wxEVT_DATAVIEW_COLUMN_REORDERED, this, col);
event.SetColumn(new_pos);
ProcessWindowEvent(event);
}
bool wxDataViewCtrl::DeleteColumn( wxDataViewColumn *column )