Re: [evolution-patches] gal patch for e-bit-array selection



On Mon, 2003-04-28 at 13:47, Chris Toshok wrote:
> The original code led to instances where we'd have 2 rows selected for a
> single selection etable.  This fixes that behavior.

revised this after talking to mkestner.. it seems to work fine without
the added bit_count > 0 check, but it can't hurt.

Chris
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/ChangeLog,v
retrieving revision 1.759
diff -u -r1.759 ChangeLog
--- ChangeLog	27 Apr 2003 05:56:47 -0000	1.759
+++ ChangeLog	28 Apr 2003 21:00:46 -0000
@@ -1,3 +1,9 @@
+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.
+
 2003-04-27  Jody Goldberg <jody gnome org>
 
 	* gal/widgets/gtk-combo-stack.c (gtk_combo_stack_construct) : tiny
Index: gal/util/e-bit-array.c
===================================================================
RCS file: /cvs/gnome/gal/gal/util/e-bit-array.c,v
retrieving revision 1.7
diff -u -r1.7 e-bit-array.c
--- gal/util/e-bit-array.c	15 Nov 2002 02:47:18 -0000	1.7
+++ gal/util/e-bit-array.c	28 Apr 2003 21:00:47 -0000
@@ -97,8 +97,8 @@
 		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);
 		}
 	}
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]