X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c87df234ac1e46508ee0cab29c3ee933cd3151b8..87f0b1323b7ac77f02133b836c8dfee63b0fd387:/src/common/textentrycmn.cpp diff --git a/src/common/textentrycmn.cpp b/src/common/textentrycmn.cpp index 54b738a9ba..2ca2077467 100644 --- a/src/common/textentrycmn.cpp +++ b/src/common/textentrycmn.cpp @@ -224,21 +224,22 @@ void wxTextEntryBase::AppendText(const wxString& text) void wxTextEntryBase::DoSetValue(const wxString& value, int flags) { - if ( value != GetValue() ) + if ( value != DoGetValue() ) { EventsSuppressor noeventsIf(this, !(flags & SetValue_SendEvent)); SelectAll(); WriteText(value); + + SetInsertionPoint(0); } else // Same value, no need to do anything. { // 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); } void wxTextEntryBase::Replace(long from, long to, const wxString& value)