]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textentrycmn.cpp
Don't use "Cancel" button in the about dialog of the listctrl sample.
[wxWidgets.git] / src / common / textentrycmn.cpp
index 971f5626688ed50faab56148b1f5a62469327d04..2ca2077467d17cc4bb96343d85e58d465f3496a2 100644 (file)
@@ -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)