Skip to content

Commit 5594ee3

Browse files
徐扬斌coremail-cyt
authored andcommitted
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 9d94399 commit 5594ee3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generic/headerctrlg.cpp

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

0 commit comments

Comments
 (0)