Fix handling of wxTextEntry hints in wxGTK.

Recent changes (r71308) optimizing away setting the text of the text entry if
it didn't really change completely broke the generic text hints implementation
as e.g. clearing the hint didn't change anything because the entry was already
logically empty anyhow.

Fix this by simply comparing the new value with the real value of the entry
returned by DoGetValue() and not GetValue() that takes hints into account.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-09-09 20:28:22 +00:00
parent 14722c43c3
commit 155ce4f184
2 changed files with 2 additions and 2 deletions

View File

@@ -224,7 +224,7 @@ 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));

View File

@@ -155,7 +155,7 @@ void wxTextEntry::WriteText(const wxString& value)
void wxTextEntry::DoSetValue(const wxString& value, int flags)
{
if (value != GetValue())
if (value != DoGetValue())
{
// use Remove() rather than SelectAll() to avoid unnecessary clipboard
// operations, and prevent triggering an apparent bug in GTK which