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:
@@ -686,8 +686,11 @@ void wxHeaderCtrl::OnMouse(wxMouseEvent& mevent)
|
|||||||
wxASSERT_MSG( !IsResizing(), "reentering column resize mode?" );
|
wxASSERT_MSG( !IsResizing(), "reentering column resize mode?" );
|
||||||
StartOrContinueResizing(col, xPhysical);
|
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
|
// start dragging the column
|
||||||
wxASSERT_MSG( !IsReordering(), "reentering column move mode?" );
|
wxASSERT_MSG( !IsReordering(), "reentering column move mode?" );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user