Ticket #14940 (closed defect: fixed)

Opened 5 months ago

Last modified 4 months ago

Header control dragging not draggable columns is possible

Reported by: jobuz Owned by:
Priority: normal Milestone:
Component: wxMSW Version: 2.9-svn
Keywords: header control dragging columns Cc:
Blocked By: Patch: yes
Blocking:

Description

The behaviour can be seen in the dataview sample.
Open page "MyMusicTreeModel" and try to drag the first column "title" over the other columns. You can see some artefacts in the header control and it is possible to move column "title" to another position. This is because we receive the item corresponding to the column the mouse points to. If they are draggable the event get not vetoed and so it is possible to move not draggable columns. The attached patch fixes this.

Attachments

headerctrl.patch download (2.4 KB) - added by jobuz 5 months ago.

Change History

Changed 5 months ago by jobuz

Changed 5 months ago by jobuz

  • version set to 2.9-svn

Changed 4 months ago by vadz

Thanks, I'll apply the patch, but I actually don't really understand what's going on here -- do we really get multiple HDN_BEGINDRAG events? If so, shouldn't we ignore all the subsequent ones to avoid generating more than one wxEVT_COMMAND_HEADER_BEGIN_REORDER event?

Changed 4 months ago by VZ

  • status changed from new to closed
  • resolution set to fixed

(In [73389]) Fix bug with dragging non-draggable columns in wxMSW wxHeaderCtrl.

Properly ignore HDN_BEGINDRAG events for the columns without wxCOL_REORDERABLE
flag. This fixes dragging non-draggable columns in wxDataViewCtrl under MSW.

Closes #14940.

Note: See TracTickets for help on using tickets.