]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch to remoce surplus text update evevt.
authorRobert Roebling <robert@roebling.de>
Wed, 24 Nov 2004 14:51:44 +0000 (14:51 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 24 Nov 2004 14:51:44 +0000 (14:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp
src/gtk1/textctrl.cpp

index 5d4025de68c029d4b23baa4c56278e78b32405f5..023debbdb1a2dd6b49ef220dfd543667212b0bee 100644 (file)
@@ -551,6 +551,9 @@ void wxTextCtrl::SetValue( const wxString &value )
         wxCharBuffer buffer( wxConvUTF8.cWC2MB( wxConvLocal.cWX2WC( value ) ) );
 #endif
         GtkTextBuffer *text_buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(m_text) );
+        if (gtk_text_buffer_get_char_count(text_buffer) != 0)
+            IgnoreNextTextUpdate();
+
         gtk_text_buffer_set_text( text_buffer, buffer, strlen(buffer) );
 
 #else
index 5d4025de68c029d4b23baa4c56278e78b32405f5..023debbdb1a2dd6b49ef220dfd543667212b0bee 100644 (file)
@@ -551,6 +551,9 @@ void wxTextCtrl::SetValue( const wxString &value )
         wxCharBuffer buffer( wxConvUTF8.cWC2MB( wxConvLocal.cWX2WC( value ) ) );
 #endif
         GtkTextBuffer *text_buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW(m_text) );
+        if (gtk_text_buffer_get_char_count(text_buffer) != 0)
+            IgnoreNextTextUpdate();
+
         gtk_text_buffer_set_text( text_buffer, buffer, strlen(buffer) );
 
 #else