]> git.saurik.com Git - wxWidgets.git/commitdiff
do send text changed event from SetValue(), it wasn't done when setting the value...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 31 Aug 2006 22:59:15 +0000 (22:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 31 Aug 2006 22:59:15 +0000 (22:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp

index 59ff4e0486f3efddd0dceec870f9e1b0f10894b0..cd4b62035b27886efb1da884fd3ae2da9a13f1ba 100644 (file)
@@ -853,10 +853,11 @@ void wxTextCtrl::SetValue( const wxString &value )
     }
     else // single line
     {
     }
     else // single line
     {
-        // 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() emits two "changed" signals if the control is
+        // not empty because internally it calls gtk_editable_delete_text() and
+        // gtk_editable_insert_text() but we want to have only one event
+        if ( !GetValue().empty() )
+            IgnoreNextTextUpdate();
 
         gtk_entry_set_text( GTK_ENTRY(m_text), wxGTK_CONV(value) );
     }
 
         gtk_entry_set_text( GTK_ENTRY(m_text), wxGTK_CONV(value) );
     }