Allow columns reordering only if its wxCOL_REORDERABLE flag is set
Dragging the column should be allowed only if wxHD_ALLOW_REORDER header style and wxCOL_REORDERABLE column flag are both set. Closes #18332.
This commit is contained in:
parent
704f03e70e
commit
3000091cd2
@ -686,8 +686,11 @@ void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
|
||||
wxASSERT_MSG( !IsResizing(), "reentering column resize mode?" );
|
||||
StartOrContinueResizing(col, xPhysical);
|
||||
}
|
||||
else if ( HasFlag(wxHD_ALLOW_REORDER) ) // on column itself
|
||||
// on column itself - both header and column must have the appropriate
|
||||
// flags to allow dragging the column
|
||||
else if ( HasFlag(wxHD_ALLOW_REORDER) && GetColumn(col).IsReorderable() )
|
||||
{
|
||||
|
||||
// start dragging the column
|
||||
wxASSERT_MSG( !IsReordering(), "reentering column move mode?" );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user