Fix wxSearchCtrl::ChangeValue() to actually change value
This was broken because wxSearchCtrl inherited the base class version of ChangeValue() which didn't really work for it due to the poor way in which wxTextEntry is designed (see #18071). Closes #16998.
This commit is contained in:
@@ -88,6 +88,8 @@ public:
|
|||||||
// operations
|
// operations
|
||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
|
virtual void ChangeValue(const wxString& value) wxOVERRIDE;
|
||||||
|
|
||||||
// editing
|
// editing
|
||||||
virtual void Clear() wxOVERRIDE;
|
virtual void Clear() wxOVERRIDE;
|
||||||
virtual void Replace(long from, long to, const wxString& value) wxOVERRIDE;
|
virtual void Replace(long from, long to, const wxString& value) wxOVERRIDE;
|
||||||
|
@@ -915,6 +915,14 @@ wxTextCtrl& operator<<(double d);
|
|||||||
wxTextCtrl& operator<<(const wxChar c);
|
wxTextCtrl& operator<<(const wxChar c);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Note that overriding DoSetValue() is currently insufficient because the base
|
||||||
|
// class ChangeValue() only updates m_hintData of this object (which is null
|
||||||
|
// anyhow), instead of updating m_text->m_hintData, see #16998.
|
||||||
|
void wxSearchCtrl::ChangeValue(const wxString& value)
|
||||||
|
{
|
||||||
|
m_text->ChangeValue(value);
|
||||||
|
}
|
||||||
|
|
||||||
void wxSearchCtrl::DoSetValue(const wxString& value, int flags)
|
void wxSearchCtrl::DoSetValue(const wxString& value, int flags)
|
||||||
{
|
{
|
||||||
m_text->DoSetValue(value, flags);
|
m_text->DoSetValue(value, flags);
|
||||||
|
Reference in New Issue
Block a user