From b459329067b9bab7d08ccec9ba22f8d9ea7f25c8 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 5 Oct 2001 18:49:52 +0000 Subject: Fixed the uniform_row_height + confirm_row_hieght_cache crash. 2001-10-05 Christopher James Lahey * e-table-item.c (eti_set_arg): Fixed the uniform_row_height + confirm_row_hieght_cache crash. svn path=/trunk/; revision=13452 --- widgets/table/e-table-item.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'widgets/table') diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 162dd3aede..d229d0de4c 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1252,12 +1252,16 @@ eti_set_arg (GtkObject *o, GtkArg *arg, guint arg_id) e_table_item_focus (eti, cursor_col != -1 ? cursor_col : 0, view_to_model_row(eti, GTK_VALUE_INT (*arg)), 0); break; case ARG_UNIFORM_ROW_HEIGHT: - eti->uniform_row_height = GTK_VALUE_BOOL (*arg); - free_height_cache(eti); - eti->needs_compute_height = 1; - e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti)); - eti->needs_redraw = 1; - gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (eti)); + if (eti->uniform_row_height != GTK_VALUE_BOOL (*arg)) { + eti->uniform_row_height = GTK_VALUE_BOOL (*arg); + if (GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) { + free_height_cache(eti); + eti->needs_compute_height = 1; + e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti)); + eti->needs_redraw = 1; + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (eti)); + } + } break; } eti->needs_redraw = 1; -- cgit v1.2.3