X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea5449ae514c2eba0dae9828cbed53b902b52d89..caddf9b41055eb11b13143361640dc733593b0a2:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 8e7593fe01..2b60a1a8f6 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -11,12 +11,16 @@ #include "wx/wxprec.h" #include "wx/textctrl.h" -#include "wx/utils.h" -#include "wx/intl.h" -#include "wx/log.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" + #include "wx/panel.h" +#endif + #include "wx/math.h" #include "wx/settings.h" -#include "wx/panel.h" #include "wx/strconv.h" #include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo()) @@ -778,9 +782,14 @@ void wxTextCtrl::SetValue( const wxString &value ) gtk_text_buffer_set_text( m_buffer, buffer, strlen(buffer) ); } - else + else // single line { - gtk_entry_set_text( GTK_ENTRY(m_text), wxGTK_CONV( value ) ); + // gtk_entry_set_text() emits two "changed" signals because internally + // it calls gtk_editable_delete_text() and gtk_editable_insert_text() + // but we want to have only one event + IgnoreNextTextUpdate(); + + gtk_entry_set_text( GTK_ENTRY(m_text), wxGTK_CONV(value) ); } // GRG, Jun/2000: Changed this after a lot of discussion in