Fix extra event sent by wxTextEntry::ChangeValue() since r71308.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 11 May 2012 22:10:25 +0000 (22:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 11 May 2012 22:10:25 +0000 (22:10 +0000)
The changes of r71308 sent the event unconditionally in case the text didn't
really change but no events should be sent if the flags don't include
SetValue_SendEvent, add a check for it.

Re-closes #13936.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/textentrycmn.cpp

index 54b738a9babb5460fce6cc98e3dd55aacc13b96a..971f5626688ed50faab56148b1f5a62469327d04 100644 (file)
@@ -235,7 +235,8 @@ void wxTextEntryBase::DoSetValue(const wxString& value, int flags)
     {
         // Except that we still need to generate the event for consistency with
         // the normal case when the text does change.
-        SendTextUpdatedEvent(GetEditableWindow());
+        if ( flags & SetValue_SendEvent )
+            SendTextUpdatedEvent(GetEditableWindow());
     }
 
     SetInsertionPoint(0);