[gnumeric] Fix sheet resize undo.



commit 6003492750601416b8a738f6c3ed42dcdae52b33
Author: Morten Welinder <terra gnome org>
Date:   Wed Apr 22 13:41:26 2009 -0400

    Fix sheet resize undo.
---
 ChangeLog   |    2 ++
 src/sheet.c |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8410d7b..6f016d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@
 
 2009-04-22  Morten Welinder  <terra gnome org>
 
+	* src/sheet.c (gnm_sheet_resize_main): Undo to the right size.
+
 	* src/wbc-gtk.c (wbcg_get_scg): Fix warning on exit.
 
 	* src/workbook.c (workbook_sheets): Change result type to GSList*.
diff --git a/src/sheet.c b/src/sheet.c
index 9fa03eb..a8b3631 100644
--- a/src/sheet.c
+++ b/src/sheet.c
@@ -1180,8 +1180,8 @@ gnm_sheet_resize_main (Sheet *sheet, int cols, int rows,
 			g_new (struct cb_sheet_resize, 1);
 		GOUndo *u;
 
-		data->cols = cols;
-		data->rows = rows;
+		data->cols = old_cols;
+		data->rows = old_rows;
 		u = go_undo_binary_new (sheet, data,
 					(GOUndoBinaryFunc)cb_sheet_resize,
 					NULL, g_free);



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