X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45388803ec75bc3e5382e1835507ed7669a13a9a..ebdb3bc7e06d54e06c8415f10277a093a4a1e4df:/src/gtk/textctrl.cpp diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 926d11283f..08bb79660b 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -924,7 +924,7 @@ wxFontEncoding wxTextCtrl::GetTextEncoding() const bool wxTextCtrl::IsEmpty() const { if ( IsMultiLine() ) - return gtk_text_buffer_get_char_count(m_buffer) != 0; + return gtk_text_buffer_get_char_count(m_buffer) == 0; return wxTextCtrlBase::IsEmpty(); } @@ -967,6 +967,12 @@ void wxTextCtrl::DoSetValue( const wxString &value, int flags ) gtk_entry_set_text( GTK_ENTRY(m_text), buffer ); } + // if, for whatever reason, the callback wasn't called the expected number + // of times, still reset the flags to the default values + m_dontMarkDirty = false; + m_countUpdatesToIgnore = 0; + + // GRG, Jun/2000: Changed this after a lot of discussion in // the lists. wxWidgets 2.2 will have a set of flags to // customize this behaviour.