aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-04-29 05:22:28 +0800
committerChris Toshok <toshok@src.gnome.org>2003-04-29 05:22:28 +0800
commit99a26e26b6baa23d331721bb5168bd51be969b3a (patch)
tree5359a013a5feef9ef909a52dd43f7aa6bb530ac5
parentabb5fe7759fd95ca721177973bd2542d472d55f1 (diff)
downloadgsoc2013-evolution-99a26e26b6baa23d331721bb5168bd51be969b3a.tar.gz
gsoc2013-evolution-99a26e26b6baa23d331721bb5168bd51be969b3a.tar.zst
gsoc2013-evolution-99a26e26b6baa23d331721bb5168bd51be969b3a.zip
fix logic for updating selection after a delete when @move_selection_mode
2003-04-28 Chris Toshok <toshok@ximian.com> * gal/util/e-bit-array.c (e_bit_array_delete_real): fix logic for updating selection after a delete when @move_selection_mode == TRUE. svn path=/trunk/; revision=20997
-rw-r--r--e-util/e-bit-array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index 2a79e1bab2..bb98a3f465 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -97,8 +97,8 @@ e_bit_array_delete_real(EBitArray *eba, int row, gboolean move_selection_mode)
if ((eba->bit_count & 0x1f) == 0) {
eba->data = g_renew(guint32, eba->data, eba->bit_count >> 5);
}
- if (move_selection_mode && selected) {
- e_bit_array_select_single_row (eba, row > 0 ? row - 1 : 0);
+ if (move_selection_mode && selected && eba->bit_count > 0) {
+ e_bit_array_select_single_row (eba, row == eba->bit_count ? row - 1 : row);
}
}
}