[gnumeric] GUI: fix selection problem.



commit 4d0466a119e94f93141a5570eff1d85ee89120e8
Author: Morten Welinder <terra gnome org>
Date:   Tue Dec 1 15:30:50 2009 -0500

    GUI: fix selection problem.

 ChangeLog      |    5 +++++
 NEWS           |    1 +
 src/commands.c |    7 ++++++-
 3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 17e04a0..c05f9e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-01  Morten Welinder  <terra gnome org>
+
+	* src/commands.c (cmd_set_text_redo): On the initial pass, don't
+	select.  Fixes #601107.
+
 2009-11-29  Morten Welinder <terra gnome org>
 
 	* configure.in: Post-release bump.
diff --git a/NEWS b/NEWS
index cb90243..65bbc1f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.9.17
 
 Morten:
 	* Elminate use of "float".
+	* Fix selection problem.  [#601107]
 
 --------------------------------------------------------------------------
 Gnumeric 1.9.16
diff --git a/src/commands.c b/src/commands.c
index 721653e..b7be795 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -740,6 +740,7 @@ typedef struct {
 	GnmCellRegion *old_contents;
 	ColRowIndexList *columns, *rows;
 	ColRowStateGroup *old_widths, *old_heights;
+	gboolean first;
 } CmdSetText;
 
 static void
@@ -828,7 +829,10 @@ cmd_set_text_redo (GnmCommand *cmd, WorkbookControl *wbc)
 				TRUE, FALSE,
 				&me->rows, &me->old_heights);
 
-	select_range (me->cmd.sheet, &r, wbc);
+	if (me->first)
+		me->first = FALSE;
+	else
+		select_range (me->cmd.sheet, &r, wbc);
 
 	return FALSE;
 }
@@ -956,6 +960,7 @@ cmd_set_text (WorkbookControl *wbc,
 		pango_attr_list_ref (me->markup);
 	r.start = r.end = *pos;
 	me->old_contents = clipboard_copy_range (sheet, &r);
+	me->first = TRUE;
 
 	text = make_undo_text (corrected_text, &truncated);
 



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