Applied patch [ 1678626 ] Non-ascii characters in wxRichTextCtrl (unicode build)

Laumingis Skripkauskas


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2007-03-12 07:46:56 +00:00
parent 24b3a55485
commit 0b14a7bdfd

View File

@ -781,7 +781,11 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
GetId());
cmdEvent.SetEventObject(this);
cmdEvent.SetFlags(flags);
#if wxUSE_UNICODE
cmdEvent.SetCharacter(event.GetUnicodeKey());
#else
cmdEvent.SetCharacter((wxChar) keycode);
#endif
cmdEvent.SetPosition(m_caretPosition+1);
if (keycode == wxT('\t'))
@ -813,7 +817,11 @@ void wxRichTextCtrl::OnChar(wxKeyEvent& event)
long newPos = m_caretPosition;
DeleteSelectedContent(& newPos);
#if wxUSE_UNICODE
wxString str = event.GetUnicodeKey();
#else
wxString str = (wxChar) event.GetKeyCode();
#endif
GetBuffer().InsertTextWithUndo(newPos+1, str, this, 0);
EndBatchUndo();