]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textctrl.cpp
DMC conflicts with old SC.
[wxWidgets.git] / src / gtk / textctrl.cpp
index 453274792e65a4c73b362607077e67a6e2c2c537..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
@@ -1483,8 +1486,10 @@ bool wxTextCtrl::SetBackgroundColour( const wxColour &colour )
     if ( !wxControl::SetBackgroundColour( colour ) )
         return FALSE;
 
+#ifndef __WXGTK20__
     if (!m_widget->window)
         return FALSE;
+#endif
 
     if (!m_backgroundColour.Ok())
         return FALSE;