Opened 6 years ago

Closed 6 years ago

#15340 closed defect (fixed)

wxDataViewCtrl column resizing triggers column sorting on OSX

Reported by: Myrsloik Owned by:
Priority: normal Milestone: 3.0.0
Component: wxOSX Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes


  1. Compile and start the dataview sample on OSX.
  2. Resize the title or artist column using the mouse.
  3. Note how the column being resized also will become sorted.

Obviously it should only resize OR sort when clicked, not both.

Change History (2)

comment:1 Changed 6 years ago by Myrsloik

  • Milestone set to 3.0
  • Patch set

-(void) outlineView:(NSOutlineView*)outlineView mouseDownInHeaderOfTableColumn:(NSTableColumn*)tableColumn
-(void) outlineView:(NSOutlineView*)outlineView didClickTableColumn:(NSTableColumn*)tableColumn

In src/osx/cocoa/ seems like the proper fix. Using the mouse down event means that it also sorts when the column is being resized. Probably also related to issue #15386.

comment:2 Changed 6 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74635]) Fix column sorting UI in wxDataViewCtrl under wxOSX.

Use -outlineView:didClickTableColumn: delegate method instead of
mouseDownInHeaderOfTableColumn: one to ensure that:

(a) We don't sort the column if it's being dragged/resized (closes #15340).
(b) We sort the column on mouse up, not down (closes #15386).

Note: See TracTickets for help on using tickets.