From fc8d3f6fbab5776dce55c4036de971b2f8114939 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 6 Feb 2016 21:43:43 -0800 Subject: [PATCH] Implement wxTextEntryBase::Clear() using Remove() instead of SetValue() This avoids problems with SetValue() overrides not doing the intended thing (for example wxComboBox). See #16654 --- include/wx/textentry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/textentry.h b/include/wx/textentry.h index 542dc14cc3..e44f3f0124 100644 --- a/include/wx/textentry.h +++ b/include/wx/textentry.h @@ -57,7 +57,7 @@ public: virtual void Replace(long from, long to, const wxString& value); virtual void Remove(long from, long to) = 0; - virtual void Clear() { SetValue(wxString()); } + virtual void Clear() { Remove(0, -1); } void RemoveSelection();