Skip to content

Commit 62c286f

Browse files
author
徐扬斌
committed
When the column header is dragged pass the leftmost/rightmost column, make it a no-op, i.e. refuse the reroder.
The old behavior is to position the dragged column to the rightmost. It is counter-intuitive. Forbid the reordering make more sense and is a de facto accepted standard.
1 parent dd7f911 commit 62c286f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generic/headerctrlg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,8 @@ bool wxHeaderCtrl::EndReordering(int xPhysical)
516516
{
517517
return false;
518518
}
519-
520-
if ( static_cast<int>(colNew) != colOld )
519+
520+
if ( static_cast<int>(colNew) != colOld && dropped_region != Region::NoWhere )
521521
{
522522
wxHeaderCtrlEvent event(wxEVT_HEADER_END_REORDER, GetId());
523523
event.SetEventObject(this);

0 commit comments

Comments
 (0)