]> git.saurik.com Git - wxWidgets.git/commitdiff
generate wxEVT_COMMAND_TEXT_ENTER for multiline controls too
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Mar 2006 00:23:36 +0000 (00:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 8 Mar 2006 00:23:36 +0000 (00:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/textctrl.cpp

index 180b5bbdd6f75486a78b8406dd20e6190fe15a9f..9630d087b9419c51e38a90f5621387e9285cc570 100644 (file)
@@ -1800,16 +1800,15 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
     switch ( event.GetKeyCode() )
     {
         case WXK_RETURN:
-            if ( !HasFlag(wxTE_MULTILINE) )
             {
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
                 InitCommandEvent(event);
                 event.SetString(GetValue());
                 if ( GetEventHandler()->ProcessEvent(event) )
+                if ( !HasFlag(wxTE_MULTILINE) )
                     return;
+                //else: multiline controls need Enter for themselves
             }
-            //else: multiline controls need Enter for themselves
-
             break;
 
         case WXK_TAB: