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
This commit is contained in:
Chris Toshok
2003-04-28 21:22:28 +00:00
committed by Chris Toshok
parent abb5fe7759
commit 99a26e26b6

View File

@ -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);
}
}
}