From 786c64e040b3fe88583d261b548b1c79e6afbe12 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:43:12 +0000 Subject: [PATCH] refine the condition check and correct a check condition git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextctrl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 51faa58970..3faa179fe3 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -1413,9 +1413,9 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) GetId()); cmdEvent1.SetEventObject(this); cmdEvent1.SetFlags(flags); -#if wxUSE_UNICODE || !__WXX11__ +#if wxUSE_UNICODE && !__WXX11__ cmdEvent1.SetCharacter(event.GetUnicodeKey()); -#elif !wxUSE_UNICODE || __WXX11__ +#else cmdEvent1.SetCharacter((wxChar) keycode); #endif cmdEvent1.SetPosition(m_caretPosition+1); @@ -1432,7 +1432,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) cmdEvent.SetFlags(flags); #if wxUSE_UNICODE && !__WXX11__ cmdEvent.SetCharacter(event.GetUnicodeKey()); -#elif !wxUSE_UNICODE || __WXX11__ +#else cmdEvent.SetCharacter((wxChar) keycode); #endif cmdEvent.SetPosition(m_caretPosition+1); @@ -1475,7 +1475,7 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event) #if wxUSE_UNICODE && !__WXX11__ wxString str = event.GetUnicodeKey(); -#elif !wxUSE_UNICODE || __WXX11__ +#else wxString str = (wxChar) event.GetKeyCode(); #endif GetFocusObject()->InsertTextWithUndo(& GetBuffer(), newPos+1, str, this, 0);