From 696a5ba3ddaf2ddca96f37972c9234d0d782b5ff Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 5 Dec 2017 06:41:08 -0800 Subject: [PATCH] Fix for modified state not set after next change following a ChangeValue() See #17540 --- include/wx/gtk/textctrl.h | 4 ++-- src/gtk/textctrl.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/wx/gtk/textctrl.h b/include/wx/gtk/textctrl.h index ae58c0bc27..f27d38cfa7 100644 --- a/include/wx/gtk/textctrl.h +++ b/include/wx/gtk/textctrl.h @@ -205,8 +205,8 @@ private: // the widget used for single line controls GtkWidget *m_text; - bool m_modified:1; - bool m_dontMarkDirty:1; + bool m_modified; + bool m_dontMarkDirty; int m_countUpdatesToIgnore; diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index ddc0b15918..d12d13b42c 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -1042,6 +1042,8 @@ void wxTextCtrl::WriteText( const wxString &text ) // we're changing the text programmatically DontMarkDirtyOnNextChange(); + // make sure marking is re-enabled even if events are suppressed + wxON_BLOCK_EXIT_SET(m_dontMarkDirty, false); // Inserting new text into the control below will emit insert-text signal // which assumes that if m_imKeyEvent is set, it is called in response to