if the tree view has already been realized; scroll to background area

2006-09-25  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): if the tree view
	has already been realized; scroll to background area instead of
	cell area. (Fixes #330683, Johan Dahlin, Tommi Komulainen).
This commit is contained in:
Kristian Rietveld 2006-09-25 14:34:52 +00:00 committed by Kristian Rietveld
parent d56ae617ef
commit b6296750fe
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2006-09-25 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): if the tree view
has already been realized; scroll to background area instead of
cell area. (Fixes #330683, Johan Dahlin, Tommi Komulainen).
2006-09-25 Kristian Rietveld <kris@gtk.org>
* gtk/gtktreeview.c (gtk_tree_view_set_grid_lines): only attempt

View File

@ -11406,7 +11406,7 @@ gtk_tree_view_scroll_to_cell (GtkTreeView *tree_view,
GdkRectangle vis_rect;
gint dest_x, dest_y;
gtk_tree_view_get_cell_area (tree_view, path, column, &cell_rect);
gtk_tree_view_get_background_area (tree_view, path, column, &cell_rect);
gtk_tree_view_tree_window_to_tree_coords (tree_view, cell_rect.x, cell_rect.y, &(cell_rect.x), &(cell_rect.y));
gtk_tree_view_get_visible_rect (tree_view, &vis_rect);