]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't send explicit update event if single line
authorJulian Smart <julian@anthemion.co.uk>
Mon, 23 Dec 2002 13:18:28 +0000 (13:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 23 Dec 2002 13:18:28 +0000 (13:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/textctrl.cpp

index 168ce7cf5ffec7b6b2a1b4665cdca0a17e56e533..f21acdc2cc8380e98205039c8937330517656a00 100644 (file)
@@ -756,7 +756,10 @@ void wxTextCtrl::DoWriteText(const wxString& value, bool selectionOnly)
 #endif // wxUSE_RICHEDIT
            )
         {
-            SendUpdateEvent();
+            // Windows already sends an update event for single-line
+            // controls.
+            if ( m_windowStyle & wxTE_MULTILINE )
+                SendUpdateEvent();
         }
     }
 
@@ -790,7 +793,11 @@ void wxTextCtrl::Clear()
         // rich edit controls send EN_UPDATE from WM_SETTEXT handler themselves
         // but the normal ones don't -- make Clear() behaviour consistent by
         // always sending this event
-        SendUpdateEvent();
+
+        // Windows already sends an update event for single-line
+        // controls.
+        if ( m_windowStyle & wxTE_MULTILINE )
+            SendUpdateEvent();
     }
 }