diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/e-table/ChangeLog | 4 | ||||
-rw-r--r-- | widgets/e-table/e-table.c | 3 | ||||
-rw-r--r-- | widgets/table/e-table.c | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index 0099c27d0d..9d677393ca 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,5 +1,9 @@ 2000-08-24 Christopher James Lahey <clahey@helixcode.com> + * e-table.c: Fix an off by one error that was causing crashes. + +2000-08-24 Christopher James Lahey <clahey@helixcode.com> + * e-table.c: Set default values for all of the signal emissions. 2000-08-24 Christopher James Lahey <clahey@helixcode.com> diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c index 26cb1504b9..7906ad877d 100644 --- a/widgets/e-table/e-table.c +++ b/widgets/e-table/e-table.c @@ -407,6 +407,7 @@ et_table_cell_changed (ETableModel *table_model, int view_col, int row, ETable * static void et_table_row_inserted (ETableModel *table_model, int row, ETable *et) { + /* This number has already been decremented. */ int row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { if (row != row_count - 1) @@ -421,7 +422,7 @@ et_table_row_deleted (ETableModel *table_model, int row, ETable *et) int row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { e_table_group_remove (et->group, row); - if (row != row_count - 1) + if (row != row_count) e_table_group_decrement(et->group, row, 1); } } diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 26cb1504b9..7906ad877d 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -407,6 +407,7 @@ et_table_cell_changed (ETableModel *table_model, int view_col, int row, ETable * static void et_table_row_inserted (ETableModel *table_model, int row, ETable *et) { + /* This number has already been decremented. */ int row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { if (row != row_count - 1) @@ -421,7 +422,7 @@ et_table_row_deleted (ETableModel *table_model, int row, ETable *et) int row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { e_table_group_remove (et->group, row); - if (row != row_count - 1) + if (row != row_count) e_table_group_decrement(et->group, row, 1); } } |