From 0b61390646d17c263e0a862acc998ba9dbd91d0e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 11 May 2012 22:10:25 +0000 Subject: [PATCH] Fix extra event sent by wxTextEntry::ChangeValue() since r71308. 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/textentrycmn.cpp b/src/common/textentrycmn.cpp index 54b738a9ba..971f562668 100644 --- a/src/common/textentrycmn.cpp +++ b/src/common/textentrycmn.cpp @@ -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); -- 2.47.2