X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/341c92a8b4c813cbfb606687937dcdf5d8c3c2fe..debdd17e991830c4ced82f5e4672fe2b32a684c2:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index f57a98eb87..7fa765d4a4 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -95,7 +95,6 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { - m_fileName = ""; SetName(name); SetValidator(validator); if (parent) parent->AddChild(this); @@ -971,9 +970,10 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) break; case WXK_RETURN: + { wxASSERT_MSG( m_windowStyle & wxTE_PROCESS_ENTER, "this text ctrl should never receive return" ); - if ( m_windowStyle & wxTE_MULTILINE == 0 ) + if ( (m_windowStyle & wxTE_MULTILINE) == 0 ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); event.SetEventObject( this ); @@ -983,7 +983,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) //else: multiline controls need Enter for themselves break; - + } case WXK_TAB: // only produce navigation event if we don't process TAB ourself or // if it's a Shift-Tab keypress (we assume nobody will ever need