From 155ce4f18462c0a8e6348cc31e73bee490fcb12d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Sep 2012 20:28:22 +0000 Subject: [PATCH 1/1] 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 --- src/common/textentrycmn.cpp | 2 +- src/gtk/textentry.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/textentrycmn.cpp b/src/common/textentrycmn.cpp index 971f562668..3e5c6117e0 100644 --- a/src/common/textentrycmn.cpp +++ b/src/common/textentrycmn.cpp @@ -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)); diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index 1354841812..a1dad35bc6 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -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 -- 2.47.2