Don't test for key code being valid unnecessarily.
The key code was already found to be valid just above, so suppress Coverity warning about an always true test by not checking it again. This also makes the code more clear. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b215dafcf1
commit
adba5bab81
@ -842,7 +842,7 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
|
||||
event.m_keyCode = key_code;
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
event.m_uniChar = gdk_keyval_to_unicode(key_code ? key_code : keysym);
|
||||
event.m_uniChar = gdk_keyval_to_unicode(key_code);
|
||||
if ( !event.m_uniChar && event.m_keyCode <= WXK_DELETE )
|
||||
{
|
||||
// Set Unicode key code to the ASCII equivalent for compatibility. E.g.
|
||||
|
Loading…
Reference in New Issue
Block a user