X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b61390646d17c263e0a862acc998ba9dbd91d0e..4d854e1536ef0c520bfb8cd0e72d5d5e92026cf0:/src/common/textentrycmn.cpp diff --git a/src/common/textentrycmn.cpp b/src/common/textentrycmn.cpp index 971f562668..2ca2077467 100644 --- a/src/common/textentrycmn.cpp +++ b/src/common/textentrycmn.cpp @@ -224,12 +224,14 @@ 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. { @@ -238,8 +240,6 @@ void wxTextEntryBase::DoSetValue(const wxString& value, int flags) if ( flags & SetValue_SendEvent ) SendTextUpdatedEvent(GetEditableWindow()); } - - SetInsertionPoint(0); } void wxTextEntryBase::Replace(long from, long to, const wxString& value)