Check that cell views are realized before doing anything here. Fixes

2001-10-06  Christopher James Lahey  <clahey@ximian.com>

	* e-table-item.c (eti_show_cursor, eti_check_cursor_bounds): Check
	that cell views are realized before doing anything here.  Fixes
	Ximian bug #11919.
	(eti_check_cursor_on_screen): If the cursor values are all set to
	-1, don't do anything.

svn path=/trunk/; revision=13488
This commit is contained in:
Christopher James Lahey
2001-10-06 17:43:47 +00:00
committed by Chris Lahey
parent 3b74bfce98
commit 90daf11b95

View File

@ -770,6 +770,9 @@ eti_show_cursor (ETableItem *eti, int delay)
{
int cursor_row;
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
return;
gtk_object_get(GTK_OBJECT(eti->selection),
"cursor_row", &cursor_row,
NULL);
@ -786,6 +789,12 @@ eti_show_cursor (ETableItem *eti, int delay)
static void
eti_check_cursor_on_screen (ETableItem *eti)
{
if (eti->cursor_x1 == -1 ||
eti->cursor_y1 == -1 ||
eti->cursor_x2 == -1 ||
eti->cursor_y2 == -1)
return;
eti->cursor_on_screen = e_canvas_item_area_shown (GNOME_CANVAS_ITEM(eti),
eti->cursor_x1,
eti->cursor_y1,
@ -800,6 +809,9 @@ eti_check_cursor_bounds (ETableItem *eti)
{
int x1, y1, x2, y2;
int cursor_row;
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
return;
gtk_object_get(GTK_OBJECT(eti->selection),
"cursor_row", &cursor_row,