diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-08-25 07:18:08 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-08-25 07:18:08 +0800 |
commit | ffc43362bc96dc767f3c25f428783009018a46c7 (patch) | |
tree | 0010a2d859cba72a92da062fe937e4839ab79cb4 | |
parent | c99edac0b5c58ba083a668a7de97409151768319 (diff) | |
download | gsoc2013-evolution-ffc43362bc96dc767f3c25f428783009018a46c7.tar.gz gsoc2013-evolution-ffc43362bc96dc767f3c25f428783009018a46c7.tar.zst gsoc2013-evolution-ffc43362bc96dc767f3c25f428783009018a46c7.zip |
Fix an off by one error that was causing crashes.
2000-08-24 Christopher James Lahey <clahey@helixcode.com>
* e-table.c: Fix an off by one error that was causing crashes.
svn path=/trunk/; revision=5027
-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); } } |