gnumeric r16919 - in trunk: . src



Author: mortenw
Date: Thu Oct 23 17:17:07 2008
New Revision: 16919
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16919&view=rev

Log:
2008-10-23  Morten Welinder  <terra gnome org>

	* src/sheet.c (sheet_delete_cols, sheet_delete_rows): Make sure
	auto-filter objects do not get kept by sheet object undo.  This
	fixes the crash in #557591.



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/src/sheet.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Thu Oct 23 17:17:07 2008
@@ -14,6 +14,7 @@
 	* Fix XLS import crash.  [#557077]
 	* Fix inter-process paste crash.  [#556561]
 	* Fix problem with auto filter after column insert.   [#557237]
+	* Fix undo problem with auto filters' combos.  [Part of #557591]
 
 --------------------------------------------------------------------------
 Gnumeric 1.9.3

Modified: trunk/src/sheet.c
==============================================================================
--- trunk/src/sheet.c	(original)
+++ trunk/src/sheet.c	Thu Oct 23 17:17:07 2008
@@ -57,6 +57,7 @@
 #include "solver.h"
 #include "hlink.h"
 #include "sheet-filter.h"
+#include "sheet-filter-combo.h"
 #include "scenarios.h"
 #include "cell-draw.h"
 #include <goffice/utils/go-glib-extras.h>
@@ -4101,6 +4102,9 @@
 	/* 1. Delete the columns (and their cells) */
 	for (i = col + count ; --i >= col; )
 		sheet_col_destroy (sheet, i, TRUE);
+
+	/* Brutally discard auto filter objects.  Collect the rest for undo.  */
+	sheet_objects_clear (sheet, &reloc_info.origin, GNM_FILTER_COMBO_TYPE, NULL);
 	sheet_objects_clear (sheet, &reloc_info.origin, G_TYPE_NONE, pundo);
 
 	/*
@@ -4250,6 +4254,9 @@
 	/* 1. Delete the rows (and their content) */
 	for (i = row + count ; --i >= row; )
 		sheet_row_destroy (sheet, i, TRUE);
+
+	/* Brutally discard auto filter objects.  Collect the rest for undo.  */
+	sheet_objects_clear (sheet, &reloc_info.origin, GNM_FILTER_COMBO_TYPE, NULL);
 	sheet_objects_clear (sheet, &reloc_info.origin, G_TYPE_NONE, pundo);
 
 	/*



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