diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-11-15 06:26:46 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-11-15 06:26:46 +0800 |
commit | f6bbfa3d44ca772031a6c6161cd7e3256955fdc2 (patch) | |
tree | 3363e94236049726c286f424a5bf636df3083da4 /widgets/misc/e-selection-model-array.c | |
parent | d932891f608a7fabaada90056e207b891cf4190a (diff) | |
download | gsoc2013-evolution-f6bbfa3d44ca772031a6c6161cd7e3256955fdc2.tar.gz gsoc2013-evolution-f6bbfa3d44ca772031a6c6161cd7e3256955fdc2.tar.zst gsoc2013-evolution-f6bbfa3d44ca772031a6c6161cd7e3256955fdc2.zip |
Bumped version number to 0.18.1.
2001-11-14 Christopher James Lahey <clahey@ximian.com>
* configure.in (GAL_CURRENT): Bumped version number to 0.18.1.
* gal/widgets/e-selection-model-array.c
(e_selection_model_array_delete_rows): Make sure the cursor row is
selected after deleting here.
svn path=/trunk/; revision=14711
Diffstat (limited to 'widgets/misc/e-selection-model-array.c')
-rw-r--r-- | widgets/misc/e-selection-model-array.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c index 552e9536ad..13c964bfba 100644 --- a/widgets/misc/e-selection-model-array.c +++ b/widgets/misc/e-selection-model-array.c @@ -52,7 +52,6 @@ void e_selection_model_array_delete_rows(ESelectionModelArray *esma, int row, int count) { if (esma->eba) { - if (E_SELECTION_MODEL(esma)->mode == GTK_SELECTION_SINGLE) e_bit_array_delete_single_mode(esma->eba, row, count); else @@ -63,6 +62,14 @@ e_selection_model_array_delete_rows(ESelectionModelArray *esma, int row, int cou else if (esma->cursor_row > row) esma->cursor_row = row; + if (esma->cursor_row >= e_bit_array_bit_count (esma->eba)) { + esma->cursor_row = e_bit_array_bit_count (esma->eba) - 1; + } else if (esma->cursor_row < 0) { + esma->cursor_row = -1; + } + if (esma->cursor_row >= 0) + e_bit_array_change_one_row(esma->eba, esma->cursor_row, TRUE); + e_selection_model_selection_changed(E_SELECTION_MODEL(esma)); e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), esma->cursor_row, esma->cursor_col); } |