[gnumeric] Avoid recalculation on pure comment deletion. [#670603]



commit ed1dfdf97f12bb6f5e453f9f1f852c33e131938d
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Feb 22 08:12:03 2012 -0700

    Avoid recalculation on pure comment deletion. [#670603]
    
    2012-02-22  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/commands.c (cmd_selection_clear): don't recalc on
    	pure comment deletion

 ChangeLog      |    5 +++++
 NEWS           |    1 +
 src/commands.c |    6 +++++-
 3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ce3378e..eb2853f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-22  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* src/commands.c (cmd_selection_clear): don't recalc on
+	pure comment deletion
+
 2012-02-21  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/workbook-view.c (wb_view_edit_line_set): use
diff --git a/NEWS b/NEWS
index a4593d7..a8cd95f 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Andreas:
 	* Fix EXACT. [#670232]
 	* Fix editing of decimals. [#670558]
 	* Fix edit line display. [#555519]
+	* Avoid recalculation on pure comment deletion. [#670603]
 
 Jean:
 	* Fix formula interpretation in plot series (with Morten's help). [#662237]
diff --git a/src/commands.c b/src/commands.c
index 7df6ee7..ac5d3aa 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1622,6 +1622,10 @@ cmd_selection_clear (WorkbookControl *wbc, int clear_flags)
 	g_string_free (types, TRUE);
 	size = g_slist_length (selection);
 
+	clear_flags |= CLEAR_NOCHECKARRAY;
+
+	if (clear_flags & (CLEAR_VALUES | CLEAR_FORMATS))
+		clear_flags |= CLEAR_RECALC_DEPS;
 
 	/* We are now ready to build the redo and undo items */
 	for (ranges = selection; ranges != NULL ; ranges = ranges->next) {
@@ -1631,7 +1635,7 @@ cmd_selection_clear (WorkbookControl *wbc, int clear_flags)
 		undo = go_undo_combine (undo, clipboard_copy_range_undo (sheet, r));
 		redo =  go_undo_combine
 			(redo, sheet_clear_region_undo
-			 (sr, clear_flags | CLEAR_NOCHECKARRAY | CLEAR_RECALC_DEPS));
+			 (sr, clear_flags));
 	}
 
 	range_fragment_free (selection);



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