diff --git a/ChangeLog b/ChangeLog index a5214087f0..21233cc117 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-02-27 Michael Natterer + + Bug 573383 – Setting a textview's buffer to NULL doesn't do a + complete job + + * gtk/gtktextview.c (gtk_text_view_set_buffer): always set + text_view->layout's buffer, also if it's NULL. + 2009-02-25 Tristan Van Berkom Bug 572904 – GtkRadioAction broken in trunk diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index bab4155bf7..da4f562730 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -1426,15 +1426,15 @@ gtk_text_view_set_buffer (GtkTextView *text_view, text_view->buffer = buffer; + if (text_view->layout) + gtk_text_layout_set_buffer (text_view->layout, buffer); + if (buffer != NULL) { GtkTextIter start; g_object_ref (buffer); - if (text_view->layout) - gtk_text_layout_set_buffer (text_view->layout, buffer); - gtk_text_buffer_get_iter_at_offset (text_view->buffer, &start, 0); text_view->dnd_mark = gtk_text_buffer_create_mark (text_view->buffer,