revert last patch. (eti_attach_cell_views): add some code to reset drags

2004-05-04  Not Zed  <NotZed@Ximian.com>

        * e-table-item.c (eti_event): revert last patch.
        (eti_attach_cell_views): add some code to reset drags and other
        things as if the model changed, so we don't keep trying to run
        things we shouldn't be on the view which might be changing.  This
        may break other things but should fix 57222 and related.

svn path=/trunk/; revision=25779
This commit is contained in:
Not Zed
2004-05-04 09:26:17 +00:00
committed by Michael Zucci
parent cf787e7c58
commit ddc0dc65f5

View File

@ -60,6 +60,9 @@
#define e_table_item_leave_edit_(x) (e_table_item_leave_edit((x)))
#endif
static void eti_check_cursor_bounds (ETableItem *eti);
static void eti_cancel_drag_due_to_model_change (ETableItem *eti);
/* FIXME: Do an analysis of which cell functions are needed before
realize and make sure that all of them are doable by all the cells
and that all of the others are only done after realization. */
@ -354,6 +357,14 @@ eti_attach_cell_views (ETableItem *eti)
g_assert (eti->header);
g_assert (eti->table_model);
/* this is just c&p from model pre change, but it fixes things */
eti_cancel_drag_due_to_model_change (eti);
eti_check_cursor_bounds (eti);
if (eti_editing (eti))
e_table_item_leave_edit_(eti);
eti->motion_row = -1;
eti->motion_col = -1;
/*
* Now realize the various ECells
*/
@ -2551,8 +2562,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
return TRUE;
if (eti->motion_row != -1 && eti->motion_col != -1 &&
(row != eti->motion_row || col != eti->motion_col)
&& eti->motion_col < eti->n_cells) {
(row != eti->motion_row || col != eti->motion_col)) {
GdkEvent *cross = gdk_event_new (GDK_LEAVE_NOTIFY);
cross->crossing.time = e->motion.time;
return_val = eti_e_cell_event (eti, eti->cell_views [eti->motion_col],