]> git.saurik.com Git - wxWidgets.git/commitdiff
don't send text changed events from ctor as wxGTK doesn't do it and people apparently...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 May 2008 00:29:47 +0000 (00:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 11 May 2008 00:29:47 +0000 (00:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/textctrl.cpp

index 780b1f89e7fec2c27812e629b035d85a036a9027..47ec9ab448782dc8a4f276af61be3b953e95e6ae 100644 (file)
@@ -484,9 +484,19 @@ bool wxTextCtrl::MSWCreateText(const wxString& value,
         valueWin = value;
     }
 
+    // suppress events sent during control creation: we're called either from
+    // the ctor and then we shouldn't generate any events for compatibility
+    // with the other ports, or from SetWindowStyleFlag() and then we shouldn't
+    // generate the events because our text doesn't really change, the fact
+    // that we (sometimes) need to recreate the control is just an
+    // implementation detail
+    m_updatesCount = -2;
+
     if ( !MSWCreateControl(windowClass.wx_str(), msStyle, pos, size, valueWin) )
         return false;
 
+    m_updatesCount = -1;
+
 #if wxUSE_RICHEDIT
     if (IsRich())
     {