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:
@@ -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 )
|
||||
|
Reference in New Issue
Block a user