[gnumeric] GUI: Make sheet-delete respect manual recalculation.



commit d42df7929a314cff8a9fad800ab37bc6f294d455
Author: Morten Welinder <terra gnome org>
Date:   Fri Mar 2 09:51:44 2012 -0500

    GUI: Make sheet-delete respect manual recalculation.

 ChangeLog      |    5 +++++
 NEWS           |    3 ++-
 src/workbook.c |    7 +++----
 3 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c848730..5bb86db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-02  Morten Welinder  <terra gnome org>
+
+	* src/workbook.c (workbook_sheet_delete): Just queue
+	recalculation, don't perform it.  Fixes #671192.
+
 2012-02-23  Morten Welinder  <terra gnome org>
 
 	* src/main-application.c (main): Explicitly discharge the splash.
diff --git a/NEWS b/NEWS
index bdbd7a2..bfbebed 100644
--- a/NEWS
+++ b/NEWS
@@ -36,7 +36,8 @@ Morten:
 	* Fix abs/rel stickiness in expression entry.  [#668691]
 	* Minor quit-dialog improvements.
 	* Put DataShuffle back on the menus.
-	* Resurrect the splash screen from bit rot.
+	* Resurrect the splash screen from bit rot.  [#670449]
+	* Make sheet removal respect manual recalculation.  [#671192]
 
 --------------------------------------------------------------------------
 Gnumeric 1.11.1
diff --git a/src/workbook.c b/src/workbook.c
index f68a08f..f548a94 100644
--- a/src/workbook.c
+++ b/src/workbook.c
@@ -972,7 +972,6 @@ workbook_sheet_delete (Sheet *sheet)
 {
 	Workbook *wb;
 	int sheet_index;
-	gboolean still_visible_sheets = FALSE;
 
         g_return_if_fail (IS_SHEET (sheet));
         g_return_if_fail (IS_WORKBOOK (sheet->workbook));
@@ -986,7 +985,7 @@ workbook_sheet_delete (Sheet *sheet)
 		workbook_focus_other_sheet (wb, sheet);
 		/* During destruction this was already done.  */
 		dependents_invalidate_sheet (sheet, FALSE);
-		still_visible_sheets = workbook_sheet_remove_controls (wb, sheet);
+		workbook_sheet_remove_controls (wb, sheet);
 	}
 
 	/* All is fine, remove the sheet */
@@ -1007,8 +1006,8 @@ workbook_sheet_delete (Sheet *sheet)
 		go_doc_set_dirty (GO_DOC (wb), TRUE);
 	g_signal_emit (G_OBJECT (wb), signals[SHEET_DELETED], 0);
 
-	if (still_visible_sheets)
-		workbook_recalc_all (wb);
+	if (!wb->during_destruction)
+		workbook_queue_all_recalc (wb);
 }
 
 /**



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