Opened 10 years ago

Closed 10 years ago

#4581 closed defect (fixed)

m_uniChar not set when wxListCtrl sends key/char events

Reported by: xaignar Owned by:
Priority: normal Milestone:
Component: GUI-generic Version:
Keywords: wxListCtrl Cc: xaignar
Blocked By: Blocking:
Patch: yes


In the functions
the properties of the wxKeyEvent received is manually assigned to a new wxKeyEvent, which is then processed. However, the variable m_uniChar is not so copied, with the result that wxKeyEvent object sent EVT_KEY_* and EVT_CHAR events always return 0 for GetUnicodeKey().

This can be fixed rather simply, as wxKeyEvent does implement an assignment operator which sets the appropriate properties. See the attached patch.

Attachments (1)

listctrl.patch download (1.6 KB) - added by xaignar 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by xaignar

comment:1 Changed 10 years ago by wojdyr

  • Keywords wxListCtrl added
  • Patch set

comment:2 Changed 10 years ago by vadz

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

Thanks for noticing this bug!

It looks like we could even use the copy ctor as we don't have to change the event type. I've committed this to both trunk and 2.8 branch as r54608.

P.S. I credited you as "Mikkel S" in docs/changes.txt using the information on your SF profile page, please let me know if you prefer anything else to be used.

Note: See TracTickets for help on using tickets.